Example #1
0
 /**
  * {@inheritdoc}
  */
 public function prepare()
 {
     foreach ($this->attributeRepository->getList() as $attribute) {
         $column = $this->columnFactory->create($attribute, $this->getContext());
         $column->prepare();
         $this->addComponent($attribute->getAttributeCode(), $column);
     }
     parent::prepare();
 }
Example #2
0
 /**
  * {@inheritdoc}
  */
 public function prepare()
 {
     foreach ($this->attributeRepository->getList() as $attribute) {
         if (!isset($this->components[$attribute->getAttributeCode()]) && $attribute->getIsFilterableInGrid()) {
             $filter = $this->filterFactory->create($attribute, $this->getContext());
             $filter->prepare();
             $this->addComponent($attribute->getAttributeCode(), $filter);
         }
     }
     parent::prepare();
 }
Example #3
0
 /**
  * {@inheritdoc}
  */
 public function prepare()
 {
     $attributeIds = $this->getContext()->getRequestParam('attributes_codes');
     if ($attributeIds) {
         foreach ($this->attributeRepository->getList() as $attribute) {
             $filter = $this->filterFactory->create($attribute, $this->getContext(), ['component' => '']);
             $filter->prepare();
             $this->addComponent($attribute->getAttributeCode(), $filter);
         }
     }
     parent::prepare();
 }
Example #4
0
 /**
  * {@inheritdoc}
  */
 public function prepare()
 {
     $columnSortOrder = self::DEFAULT_COLUMNS_MAX_ORDER;
     foreach ($this->attributeRepository->getList() as $attribute) {
         if (!isset($this->components[$attribute->getAttributeCode()])) {
             $config['sortOrder'] = ++$columnSortOrder;
             $column = $this->columnFactory->create($attribute, $this->getContext(), $config);
             $column->prepare();
             $this->addComponent($attribute->getAttributeCode(), $column);
         }
     }
     parent::prepare();
 }