Exemple #1
0
 public function generateAction()
 {
     if (!MAction::isAction($this->action)) {
         $this->setAction('+' . $this->action);
     }
 }
Exemple #2
0
 public static function generate($control, $action)
 {
     $isAction = MAction::isAction($action);
     if ($isAction) {
         if (!$control->hasEvent('onClick') && !$control->hasEvent('click')) {
             $control->addEvent('click', MAction::getOnClick($action, $control->getId(), $control->target));
         }
         return '';
     } else {
         return MAction::getHref($action);
     }
 }
Exemple #3
0
 public function getActionURL($action = '')
 {
     if (MAction::isAction($action)) {
         $url = $action;
     } else {
         $url = ">" . ($this->module ? $this->module . "/" : '') . "{$this->getController()->getName()}/{$action}";
     }
     return $url;
 }