Issue #2084653 by longwave, joachim: Add inline comments to config sorting
parent
7dedb6cad0
commit
da833c9ed8
|
@ -20,6 +20,9 @@ class ConfigEntityListController extends EntityListController {
|
||||||
*/
|
*/
|
||||||
public function load() {
|
public function load() {
|
||||||
$entities = parent::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'));
|
uasort($entities, array($this->entityInfo['class'], 'sort'));
|
||||||
return $entities;
|
return $entities;
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,6 +101,7 @@ class BlockListController extends ConfigEntityListController implements FormInte
|
||||||
// @todo Move the functionality of _block_rehash() out of the listing page.
|
// @todo Move the functionality of _block_rehash() out of the listing page.
|
||||||
$entities = _block_rehash($this->theme);
|
$entities = _block_rehash($this->theme);
|
||||||
|
|
||||||
|
// Sort the blocks using \Drupal\block\Entity\Block::sort().
|
||||||
uasort($entities, array($this->entityInfo['class'], 'sort'));
|
uasort($entities, array($this->entityInfo['class'], 'sort'));
|
||||||
return $entities;
|
return $entities;
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,9 @@ class LanguageListController extends DraggableListController {
|
||||||
*/
|
*/
|
||||||
public function load() {
|
public function load() {
|
||||||
$entities = $this->storage->loadByProperties(array('locked' => '0'));
|
$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'));
|
uasort($entities, array($this->entityInfo['class'], 'sort'));
|
||||||
return $entities;
|
return $entities;
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,7 @@ class RoleStorageController extends ConfigStorageController implements RoleStora
|
||||||
*/
|
*/
|
||||||
protected function attachLoad(&$queried_entities, $revision_id = FALSE) {
|
protected function attachLoad(&$queried_entities, $revision_id = FALSE) {
|
||||||
// Sort the queried roles by their weight.
|
// Sort the queried roles by their weight.
|
||||||
|
// See \Drupal\Core\Config\Entity\ConfigEntityBase::sort().
|
||||||
uasort($queried_entities, array($this->entityInfo['class'], 'sort'));
|
uasort($queried_entities, array($this->entityInfo['class'], 'sort'));
|
||||||
|
|
||||||
parent::attachLoad($queried_entities, $revision_id);
|
parent::attachLoad($queried_entities, $revision_id);
|
||||||
|
|
Loading…
Reference in New Issue