示例#1
0
 /**
  * __invoke 
  * 
  * @access public
  * @param array $options array of options
  * @return string
  */
 public function __invoke($url, $parentId)
 {
     $form = $this->getCommentForm();
     $form->get('url')->setAttribute('value', $url);
     $container = new \Zend\Session\Container();
     $errors = $container->offsetGet('form_errors');
     if (isset($errors)) {
         $form->setMessages($errors);
     }
     $container->offsetUnset('form_errors');
     $vm = new ViewModel(array('form' => $form, 'url' => $url, 'parentId' => $parentId));
     $vm->setTemplate('comment/comment/index');
     return $this->getView()->render($vm);
 }
示例#2
0
 /**
  * Delete all items from the cart
  *
  * @return true
  */
 public function destroy()
 {
     $this->session->offsetUnset('cart');
     return true;
 }