SHARE
TWEET

Untitled

a guest Jun 27th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <route url="/V1/customapi" method="POST">
  2.         <service class="SarkCustomApiApiCustomRepositoryInterface" method="create"/>
  3.         <resources>
  4.              <resource ref="self"/>
  5.         </resources>
  6.     </route>
  7.      
  8. $objectManager = MagentoFrameworkAppObjectManager::getInstance();
  9.     $indexerCollectionFactory = $objectManager->get("MagentoIndexerModelIndexerCollectionFactory");
  10.     $indexerFactory = $objectManager->get("MagentoIndexerModelIndexerFactory");
  11.  
  12.     $indexerCollection = $indexerCollectionFactory->create();
  13.     $allIds = $indexerCollection->getAllIds();
  14.     foreach ($allIds as $id) {
  15.         $indexer = $indexerFactory->create()->load($id);
  16.         $indexer->reindexAll();
  17.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top