15 class Columns extends \Magento\Ui\Component\Listing\Columns
38 'boolean' =>
'select',
39 'multiselect' =>
'select',
40 'date' =>
'dateRange',
60 $this->columnFactory = $columnFactory;
62 $this->inlineEditUpdater = $inlineEditor;
71 foreach ($this->components as $component) {
72 $config = $component->getData(
'config');
87 if (isset($this->components[
'actions'])) {
88 $component = $this->components[
'actions'];
102 foreach ($this->attributeRepository->getList() as $newAttributeCode =>
$attributeData) {
103 if (isset($this->components[$newAttributeCode])) {
128 $this->
addComponent($attributeData[AttributeMetadata::ATTRIBUTE_CODE], $column);
138 $component = $this->components[
$attributeData[AttributeMetadata::ATTRIBUTE_CODE]];
141 if (
$attributeData[AttributeMetadata::BACKEND_TYPE] !=
'static') {
144 $component->getData(
'config'),
146 'name' => $newAttributeCode,
148 'visible' => (bool)
$attributeData[AttributeMetadata::IS_VISIBLE_IN_GRID]
154 $component->setData(
'config',
$config);
158 && !empty($component->getData(
'config')[
'editor'])
160 $this->inlineEditUpdater->applyEditing(
170 $component->getData(
'config'),
171 [
'visible' => (bool)
$attributeData[AttributeMetadata::IS_VISIBLE_IN_GRID]]
187 if (count(
$attributeData[AttributeMetadata::OPTIONS]) && !isset(
$config[AttributeMetadata::OPTIONS])) {
203 return isset($this->filterMap[$frontendInput]) ? $this->filterMap[$frontendInput] : $this->filterMap[
'default'];
updateColumn(array $attributeData, $newAttributeCode)
getFilterType($frontendInput)
getData($key='', $index=null)
elseif(isset( $params[ 'redirect_parent']))
__construct(ContextInterface $context, ColumnFactory $columnFactory, AttributeRepository $attributeRepository, InlineEditUpdater $inlineEditor, array $components=[], array $data=[])
addOptions(UiComponentInterface $component, array $attributeData)
setData($key, $value=null)
updateActionColumnSortOrder()
addColumn(array $attributeData, $columnName)
addComponent($name, UiComponentInterface $component)