public function menuSubmenuAction() { $post = $this->getRequest()->getPost(); $table = new ZfBlank_DbTable_SiteMenu(); $this->view->id = $table->addItem(isset($post['parent']) ? $post['parent'] : null, $post['name'], $post['link']); //sends JSON with data: "id": new_item_id }