Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed tree of elements in property sets #16599

Merged
merged 2 commits into from
Aug 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@
$defaults = [
'template' => 'icon icon-columns',
'chunk' => 'icon icon-th-large',
'tv' => 'icon icon-asterisk',
'tv' => 'icon icon-list-alt',
'snippet' => 'icon icon-code',
'plugin' => 'icon icon-cog',
'plugin' => 'icon icon-cogs',
'category' => 'icon icon-folder',
'propertyset' => 'icon icon-sitemap',
];
Expand Down Expand Up @@ -206,8 +206,8 @@
'modElementPropertySet.element_class' => $class,
'modElementPropertySet.property_set' => $this->node[1],
]);
$uk = ($class == modTemplate::class) ? 'templatename' : 'name';
$c->sortby($alias . '.' . $uk, 'ASC');
$name = ($class == modTemplate::class) ? 'templatename' : 'name';
$c->sortby($alias . '.' . $name, 'ASC');
$els = $this->modx->getIterator(modElementPropertySet::class, $c);

/** @var modElementPropertySet $el */
Expand All @@ -227,13 +227,12 @@
];
}
$setArray = [
'text' => $el->get('name'),
'text' => $el->get($name),
'id' => 'el_' . $el->get('property_set') . '_' . $el->get('id') . '_' . $class,
'leaf' => true,
'href' => '',
'pk' => $el->get('id'),
'qtip' => "<i>{$alias}</i>: <b>{$el->get('name')}</b>" . ($el->get('description') != '' ? ' - ' . $el->get('description') : ''),
'cls' => 'icon-' . strtolower($alias),
'qtip' => "<i>{$alias}</i>: <b>{$el->get($name)}</b>" . ($el->get('description') != '' ? ' - ' . $el->get('description') : ''),

Check warning on line 235 in core/src/Revolution/Processors/Element/PropertySet/GetNodes.php

View workflow job for this annotation

GitHub Actions / phpcs

Line exceeds 120 characters; contains 147 characters
'iconCls' => $this->getNodeIcon($alias),
'propertyset' => $el->get('property_set'),
'element_class' => $class,
Expand Down Expand Up @@ -267,4 +266,3 @@
return $this->toJSON($list);
}
}

Loading