コード例 #1
0
ファイル: Columns.php プロジェクト: Doability/magento2dev
 /**
  * {@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();
 }
コード例 #2
0
ファイル: Filters.php プロジェクト: whoople/magento2-testing
 /**
  * {@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();
 }
コード例 #3
0
ファイル: Filters.php プロジェクト: whoople/magento2-testing
 /**
  * {@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();
 }
コード例 #4
0
ファイル: Columns.php プロジェクト: whoople/magento2-testing
 /**
  * {@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();
 }