Esempio n. 1
0
 private function editorTypeHandle(WallPost $a)
 {
     if ($a === null) {
         throw new Exceptions\NullPointerException("Argument Event cannot be null");
     }
     try {
         $editor = null;
         if ($this->getUserService() !== null) {
             $id = $this->getMixId($a->getEditor());
             if ($id !== null) {
                 $editor = $this->getUserService()->getUser($id, false);
             }
         }
         $a->setEditor($editor);
     } catch (\Exception $ex) {
         $this->logError($ex->getMessage());
         throw new Exceptions\DataErrorException($ex->getMessage(), $ex->getCode(), $ex->getPrevious());
     }
 }
Esempio n. 2
0
 /**
  * Top-down handler for update wallpost. Wallpost form onSuccess event handler.
  * @param ArrayHash $values
  */
 public function updateWallPost(ArrayHash $values)
 {
     try {
         $wp = new WallPost((array) $values);
         $wp->setEditor($this->getUser()->getIdentity());
         $this->wallService->updateWallPost($wp);
     } catch (Exceptions\DataErrorException $ex) {
         $this->handleDataSave($values->id, "default", $ex);
     }
     $this->redirect("default");
 }