/** * Call-back function for sorting transitions by their priority. Lower sort index => lower priority. * @param WorkflowTransition $a * @param WorkflowTransition $b */ private static function sortTransitions(WorkflowTransition $a, WorkflowTransition $b) { if ($a->getSortIndex() == $b->getSortIndex()) { return 0; } return $a->getSortIndex() < $b->getSortIndex() ? -1 : 1; }
public function allowed(Internship $i) { if ($i->isDistanceEd()) { if (\Current_User::allow('intern', 'distance_ed_register')) { return true; } else { return false; } } else { return parent::allowed($i); } return false; }