Author: Romain Ruaud (romain.ruaud@smile.fr)
Inheritance: extends Magento\Search\Model\Autocomplete\ItemFactory
Example #1
0
 /**
  * {@inheritDoc}
  */
 public function getItems()
 {
     $result = [];
     $categoryCollection = $this->getCategoryCollection();
     if ($categoryCollection) {
         foreach ($categoryCollection as $category) {
             $result[] = $this->itemFactory->create(['category' => $category, 'type' => $this->getType()]);
         }
     }
     return $result;
 }