Inheritance: implements eZ\Publish\SPI\Search\Content\Handler
Beispiel #1
0
 /**
  * Index Locations of the given Content Object.
  *
  * @param int $contentId Content Object Id
  * @param \Symfony\Component\Console\Helper\ProgressBar $progress
  */
 private function indexLocations($contentId, ProgressBar $progress)
 {
     $locationIds = $this->getContentLocationIds($contentId);
     foreach ($locationIds as $locationId) {
         try {
             $location = $this->persistenceHandler->locationHandler()->load($locationId);
             $this->searchHandler->indexLocation($location);
         } catch (NotFoundException $e) {
             $this->logWarning($progress, "Could not load Location with id {$locationId}, so skipped for indexing. Full exception: " . $e->getMessage());
         }
     }
 }