public static function WebformImageSelectImages::sort in Webform 6.x
Same name and namespace in other branches
- 8.5 modules/webform_image_select/src/Entity/WebformImageSelectImages.php \Drupal\webform_image_select\Entity\WebformImageSelectImages::sort()
Helper callback for uasort() to sort configuration entities by weight and label.
Overrides ConfigEntityBase::sort
File
- modules/
webform_image_select/ src/ Entity/ WebformImageSelectImages.php, line 146
Class
- WebformImageSelectImages
- Defines the webform image select images entity.
Namespace
Drupal\webform_image_select\EntityCode
public static function sort(ConfigEntityInterface $a, ConfigEntityInterface $b) {
$a_label = $a
->get('category') . $a
->label();
$b_label = $b
->get('category') . $b
->label();
return strnatcasecmp($a_label, $b_label);
}