public static function GroupRole::postLoad in Group 8
Same name and namespace in other branches
- 2.0.x src/Entity/GroupRole.php \Drupal\group\Entity\GroupRole::postLoad()
Acts on loaded entities.
Parameters
\Drupal\Core\Entity\EntityStorageInterface $storage: The entity storage object.
\Drupal\Core\Entity\EntityInterface[] $entities: An array of entities.
Overrides EntityBase::postLoad
File
- src/
Entity/ GroupRole.php, line 311
Class
- GroupRole
- Defines the Group role configuration entity.
Namespace
Drupal\group\EntityCode
public static function postLoad(EntityStorageInterface $storage, array &$entities) {
parent::postLoad($storage, $entities);
// Sort the queried roles by their weight.
// See \Drupal\Core\Config\Entity\ConfigEntityBase::sort().
uasort($entities, 'static::sort');
}