public function Page::variantSortHelper in Page Manager 8.4
Same name and namespace in other branches
- 8 src/Entity/Page.php \Drupal\page_manager\Entity\Page::variantSortHelper()
File
- src/
Entity/ Page.php, line 439
Class
- Page
- Defines a Page entity class.
Namespace
Drupal\page_manager\EntityCode
public function variantSortHelper($a, $b) {
$a_weight = $a
->getWeight();
$b_weight = $b
->getWeight();
if ($a_weight == $b_weight) {
return 0;
}
return $a_weight < $b_weight ? -1 : 1;
}