Example #1
0
 public static function getHref($href)
 {
     if ($href != '') {
         if ($href[0] == '#') {
             $href = Manager::getStaticURL(Manager::getApp(), substr($href, 1));
         } else {
             $href = MAction::getHrefAction($href);
         }
     }
     return $href;
 }
Example #2
0
 public function mactionpanel($control)
 {
     $actions = Manager::getActions();
     if ($control->property->actions) {
         $selection = explode('.', $control->property->actions);
         do {
             $actions = $actions[current($selection)][5];
         } while (next($selection) !== false);
         foreach ($actions as $action) {
             $link = new MLinkButton();
             $link->property->iconCls = $action[2];
             $link->property->plain = true;
             $link->property->size = 'large';
             $link->property->text = $action[0];
             $link->property->options['iconAlign'] = 'top';
             $link->property->action = Maestro\UI\MAction::isAction($action[1]) ? $action[1] : '>' . $action[1];
             MAction::generate($link);
             $control->addControl($link);
         }
     }
     return $this->mpanel($control);
 }