Skip to content
Snippets Groups Projects
Commit da833c9e authored by Jennifer Hodgdon's avatar Jennifer Hodgdon
Browse files

Issue #2084653 by longwave, joachim: Add inline comments to config sorting

parent 7dedb6ca
No related branches found
No related tags found
No related merge requests found
......@@ -20,6 +20,9 @@ class ConfigEntityListController extends EntityListController {
*/
public function load() {
$entities = parent::load();
// Sort the entities using the entity class's sort() method.
// See \Drupal\Core\Config\Entity\ConfigEntityBase::sort().
uasort($entities, array($this->entityInfo['class'], 'sort'));
return $entities;
}
......
......@@ -101,6 +101,7 @@ public function load() {
// @todo Move the functionality of _block_rehash() out of the listing page.
$entities = _block_rehash($this->theme);
// Sort the blocks using \Drupal\block\Entity\Block::sort().
uasort($entities, array($this->entityInfo['class'], 'sort'));
return $entities;
}
......
......@@ -24,6 +24,9 @@ class LanguageListController extends DraggableListController {
*/
public function load() {
$entities = $this->storage->loadByProperties(array('locked' => '0'));
// Sort the entities using the entity class's sort() method.
// See \Drupal\Core\Config\Entity\ConfigEntityBase::sort().
uasort($entities, array($this->entityInfo['class'], 'sort'));
return $entities;
}
......
......@@ -29,6 +29,7 @@ public function deleteRoleReferences(array $rids) {
*/
protected function attachLoad(&$queried_entities, $revision_id = FALSE) {
// Sort the queried roles by their weight.
// See \Drupal\Core\Config\Entity\ConfigEntityBase::sort().
uasort($queried_entities, array($this->entityInfo['class'], 'sort'));
parent::attachLoad($queried_entities, $revision_id);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment