Exemple #1
0
 public function createWallPost(WallPost $w)
 {
     if ($w == null) {
         throw new Exceptions\NullPointerException("Argument WallPost cannot be null");
     }
     try {
         $w->setAuthor($w->getEditor());
         $w->setUpdated(new DateTime());
         $this->sportGroupsTypeHandle($w);
         $this->wallDao->save($w);
         $this->invalidateEntityCache();
         $this->onCreate(clone $w);
     } catch (\Exception $ex) {
         $this->logError($ex->getMessage());
         throw new Exceptions\DataErrorException($ex->getMessage(), $ex->getCode(), $ex->getPrevious());
     }
 }