Beispiel #1
0
 /**
  * Agrega un item al menu
  */
 public function addEntryAction()
 {
     $idParent = $this->getRequest()->getParam('idParent');
     $idAction = $this->getRequest()->getParam('idAction');
     $name = $this->getRequest()->getParam('name');
     $order = $this->getRequest()->getParam('order', 0);
     $menuItem = Factory\MenuItemFactory::createFromArray(array('id_parent' => $idParent == 0 ? null : $idParent, 'id_action' => $idAction, 'name' => utf8_decode($name), 'order' => $order));
     $this->getCatalog("MenuItemCatalog")->create($menuItem);
     die(Zend_Json::encode(array('code' => 200, 'id' => $menuItem->getIdMenuItem())));
 }
Beispiel #2
0
 /**
  *
  * makeBean
  * @param array $resultset
  * @return \Application\Model\Bean\MenuItem
  */
 protected function makeBean($resultset)
 {
     return MenuItemFactory::createFromArray($resultset);
 }