You are here

public static function ConfigTest::sort in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/config/tests/config_test/src/Entity/ConfigTest.php \Drupal\config_test\Entity\ConfigTest::sort()

Helper callback for uasort() to sort configuration entities by weight and label.

Overrides ConfigEntityBase::sort

File

core/modules/config/tests/config_test/src/Entity/ConfigTest.php, line 85
Contains \Drupal\config_test\Entity\ConfigTest.

Class

ConfigTest
Defines the ConfigTest configuration entity.

Namespace

Drupal\config_test\Entity

Code

public static function sort(ConfigEntityInterface $a, ConfigEntityInterface $b) {
  \Drupal::state()
    ->set('config_entity_sort', TRUE);
  return parent::sort($a, $b);
}