public static Block::sort(ConfigEntityInterface $a, ConfigEntityInterface $b)
Sorts active blocks by weight; sorts inactive blocks by name.
Overrides ConfigEntityBase::sort
File
core/modules/block/src/Entity/Block.php, line 206
Class
Block Defines a Block configuration entity class.
Namespace
Drupal\block\Entity
Code
public static function sort(ConfigEntityInterface $a, ConfigEntityInterface $b) {
// Separate enabled from disabled.
$status = (int) $b->status() - (int) $a->sta