private function authorTypeHandle(WallPost $a) { if ($a === null) { throw new Exceptions\NullPointerException("Argument Event cannot be null"); } try { $author = null; if ($this->getUserService() !== null) { $id = $this->getMixId($a->getAuthor()); if ($id !== null) { $author = $this->getUserService()->getUser($id, false); } } $a->setAuthor($author); } catch (\Exception $ex) { $this->logError($ex->getMessage()); throw new Exceptions\DataErrorException($ex->getMessage(), $ex->getCode(), $ex->getPrevious()); } }
/** * Grid column render * @param WallPost $el * @return string */ public function commentModeRender($el) { return $this->tt(CommentMode::getOptions()[$el->getCommentMode()]); }