示例#1
0
 /**
  * (non-PHPdoc)
  *
  * @see \Simplify\Form\Action::onCreateItemMenu()
  */
 public function onCreateItemMenu(Menu $menu, Action $action, $data)
 {
     if (!$action->show(Form::ACTION_CREATE) && !$action->show(Form::ACTION_EDIT)) {
         $url = $this->editUrl($data);
         $item = new MenuItem($this->getName(), $this->getTitle(), Form::ICON_EDIT, $url);
         $menu->getItemByName('main')->addItem($item);
     }
 }
示例#2
0
 /**
  * (non-PHPdoc)
  *
  * @see \Simplify\Form\Action::onCreateItemMenu()
  */
 public function onCreateItemMenu(\Simplify\Menu $menu, \Simplify\Form\Action $action, $data)
 {
     if (!$action->show(\Simplify\Form::ACTION_CREATE)) {
         $url = $this->form->url()->extend();
         $url->set('formAction', $this->getName());
         $url->set(Form::ID, $data[Form::ID]);
         $item = new \Simplify\MenuItem($this->getName(), $this->getTitle(), Form::ICON_DELETE, $url);
         $menu->getItemByName('main')->addItem($item);
     }
 }
示例#3
0
 /**
  * (non-PHPdoc)
  *
  * @see \Simplify\Form\Action::onCreateItemMenu()
  */
 public function onCreateItemMenu(Menu $menu, Action $action, $data)
 {
     if (!$action->show(Form::ACTION_VIEW)) {
         $url = $this->form->url()->extend(null, array('formAction' => $this->getName(), Form::ID => $data[Form::ID]));
         $menu->getItemByName('main')->addItem(new MenuItem($this->getName(), $this->getTitle(), 'search', $url));
     }
 }
示例#4
0
 /**
  * (non-PHPdoc)
  * 
  * @see Simplify\Form\Action::onCreateMenu()
  */
 public function onCreateMenu(Menu $menu)
 {
     $item = new MenuItem($this->getName(), $this->getTitle(), Form::ICON_LIST, $this->url());
     $menu->getItemByName('main')->addItem($item);
 }
示例#5
0
 /**
  * (non-PHPdoc)
  *
  * @see Simplify\Form\Action::onCreateMenu()
  */
 public function onCreateMenu(Menu $menu, Action $action)
 {
     if ($action !== $this) {
         $menu->getItemByName('main')->addItem(new MenuItem($this->getName(), $this->getTitle(), 'calendar', $this->url()));
     }
 }
示例#6
0
 /**
  * (non-PHPdoc)
  * @see \Simplify\Form\Action::onCreateMenu()
  */
 public function onCreateMenu(\Simplify\Menu $menu)
 {
     $menu->getItemByName('main')->addItem(new \Simplify\MenuItem($this->getName(), $this->getTitle(), null, new \Simplify\URL(null, array('formAction' => $this->getName()))));
 }
示例#7
0
 /**
  * (non-PHPdoc)
  * @see \Simplify\Form\Action::onCreateMenu()
  */
 public function onCreateMenu(Menu $menu)
 {
     $url = $this->createUrl();
     $item = new MenuItem($this->getName(), $this->getTitle(), Form::ICON_CREATE, $url);
     $menu->getItemByName('main')->addItem($item);
 }