Exemple #1
0
 /**
  * @return \Zend\Http\Response
  */
 public function deleteAction()
 {
     $slug = $this->params('slug');
     $this->postService->delete($slug);
     $this->flashMessenger()->setNamespace('sxblog_post')->addMessage($this->getMessage('post_deletion_success'));
     return $this->redirect()->toRoute($this->options->getRouteAfterPostDelete());
 }
Exemple #2
0
 /**
  * Invoke the view helper. Accepts options.
  *
  * @param   array|\Traversable   $options
  *
  * @return \SxBlog\View\Helper\Categories
  */
 public function __invoke(array $options = array())
 {
     if (!empty($options)) {
         $this->options->setFromArray($options);
     }
     return $this;
 }