/** * Sorts the themes by default value. that means, * the themes which have been set as default for a theme type, * they are listed first. * @param Cx\Core\View\Model\Entity\Theme $a theme 1 * @param Cx\Core\View\Model\Entity\Theme $b theme 2 * @return int */ public function sortThemesByDefault($a, $b) { if ($a->isDefault() && $b->isDefault()) { return 0; } if ($a->isDefault() && !$b->isDefault()) { return -1; } return 1; }