/** * {@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(); }
/** * {@inheritdoc} */ public function prepare() { $this->columnSortOrder = $this->getDefaultSortOrder(); foreach ($this->attributeRepository->getList() as $newAttributeCode => $attributeData) { if (isset($this->components[$newAttributeCode])) { $this->updateColumn($attributeData, $newAttributeCode); } elseif (!$attributeData[AttributeMetadata::BACKEND_TYPE] != 'static' && $attributeData[AttributeMetadata::IS_USED_IN_GRID]) { $this->addColumn($attributeData, $newAttributeCode); } } $this->updateActionColumnSortOrder(); parent::prepare(); }
/** * {@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(); }