function DateFormat::sort
Same name in other branches
- 9 core/lib/Drupal/Core/Datetime/Entity/DateFormat.php \Drupal\Core\Datetime\Entity\DateFormat::sort()
- 10 core/lib/Drupal/Core/Datetime/Entity/DateFormat.php \Drupal\Core\Datetime\Entity\DateFormat::sort()
- 11.x core/lib/Drupal/Core/Datetime/Entity/DateFormat.php \Drupal\Core\Datetime\Entity\DateFormat::sort()
Overrides ConfigEntityBase::sort
File
-
core/
lib/ Drupal/ Core/ Datetime/ Entity/ DateFormat.php, line 87
Class
- DateFormat
- Defines the Date Format configuration entity class.
Namespace
Drupal\Core\Datetime\EntityCode
public static function sort(ConfigEntityInterface $a, ConfigEntityInterface $b) {
if ($a->isLocked() == $b->isLocked()) {
$a_label = $a->label();
$b_label = $b->label();
return strnatcasecmp($a_label, $b_label);
}
return $a->isLocked() ? 1 : -1;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.