/** * @param \Pluswerk\Simpleblog\Domain\Model\Blog $blog */ public function deleteAction(\Pluswerk\Simpleblog\Domain\Model\Blog $blog) { $this->blogRepository->remove($blog); $this->redirect('list'); }
public function jsonAction() { $this->view->setVariablesToRender(array('blogs', 'posts')); $this->view->setConfiguration(array('blogs' => array('_descendAll' => array('_only' => array('title', 'posts'), '_descend' => array('posts' => array('_descendAll' => array('_only' => array('title')))))))); $this->view->assign('blogs', $this->blogRepository->findAll()); }