Exemplo n.º 1
0
 /**
  * Deletes a given module with the given key.
  * 
  * @param string $key
  */
 public function delete($key)
 {
     $menuMapper = new MenuMapper();
     $menuMapper->deleteItemsByModuleKey($key);
     $this->db()->delete('modules')->where(array('key' => $key))->execute();
     $this->db()->delete('modules_content')->where(array('key' => $key))->execute();
 }
Exemplo n.º 2
0
 public function addAction()
 {
     $menuMapper = new MenuMapper();
     $menu = new MenuModel();
     $menu->setTitle('New');
     $newId = $menuMapper->save($menu);
     $this->addMessage('saveSuccess');
     $this->redirect(array('action' => 'index', 'menu' => $newId));
 }