Ejemplo n.º 1
0
 /**
  * Builds the condition to be used for the specified event.
  * @param \ManiaScript\Builder\Event\MenuNavigation $event The event.
  * @return string The condition.
  */
 protected function buildCondition($event)
 {
     $conditions = array();
     foreach ($event->getActions() as $action) {
         $conditions[$action] = 'Event.MenuNavAction == CMlEvent::EMenuNavAction::' . $action;
     }
     $result = '';
     if (!empty($conditions)) {
         $result = implode(' || ', $conditions);
     }
     return $result;
 }