src/EcommerceFrameworkBundle/Model/IndexableDamEntry.php line 8

Open in your IDE?
  1. <?php
  2. namespace App\EcommerceFrameworkBundle\Model;
  3. use Pimcore\Bundle\EcommerceFrameworkBundle\Model\IndexableInterface;
  4. use Pimcore\Model\DataObject\DamEntry;
  5. class IndexableDamEntry extends DamEntry implements IndexableInterface
  6. {
  7.     protected $isActive false;
  8.     /**
  9.      * @inheritDoc
  10.     */
  11.     public function isActive(bool $inProductList false): bool
  12.     {
  13.         if ($this->isPublished()) {
  14.             $this->isActive true;
  15.         }
  16.         return $this->isActive;
  17.     }
  18.     /**
  19.      * @inheritDoc
  20.     */
  21.     public function getObjectType()
  22.     {
  23.         return $this->getType();
  24.     }
  25.     /**
  26.      * @inheritDoc
  27.     */
  28.     public function getPriceSystemName(): ?string
  29.     {
  30.         return '';
  31.     }
  32.     /**
  33.      * @inheritDoc
  34.     */
  35.     public function getOSDoIndexProduct(): bool
  36.     {
  37.         return true;
  38.     }
  39.     /**
  40.      * @inheritDoc
  41.     */
  42.     public function getOSIndexType(): ?string
  43.     {
  44.         return $this->getObjectType();
  45.     }
  46.     /**
  47.      * @inheritDoc
  48.     */
  49.     public function getOSParentId(): ?int
  50.     {
  51.         return $this->getParentId();
  52.     }
  53.     public function getIndustryNames(): string
  54.     {
  55.         $relations $this->getIndustries();
  56.         $objects = [];
  57.         if (!empty($relations)) {
  58.             foreach ($relations as $relation) {
  59.                 array_push($objects$relation->getName());
  60.             }
  61.         }
  62.         return implode(', ',$objects);
  63.     }
  64.     public function getCategoryNames(): string
  65.     {
  66.         $relations $this->getCategories();
  67.         $objects = [];
  68.         if (!empty($relations)) {
  69.             foreach ($relations as $relation) {
  70.                 array_push($objects$relation->getName());
  71.             }
  72.         }
  73.         return implode(', ',$objects);
  74.     }
  75. }