示例#1
0
 /**
  * Handler for update comment to article
  * @param ArrayHash $values
  */
 public function updateComment(ArrayHash $values)
 {
     try {
         $comment = new \App\Model\Entities\PageComment((array) $values);
         $comment->setEditor($this->getUser()->getIdentity());
         $comment->setUpdated(new DateTime());
         $this->staticPageService->updateComment($comment, $this->getEntity());
     } catch (Exceptions\DataErrorException $ex) {
         $this->handleDataSave($values->id, "this", $ex);
     }
     if (!$this->isAjax()) {
         $this->redirect("this");
     } else {
         $this->redrawControl("commentsData");
     }
 }