コード例 #1
0
 /**
  * {@inheritDoc}
  */
 public function setCreatedDate($createdDate)
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'setCreatedDate', array($createdDate));
     return parent::setCreatedDate($createdDate);
 }
コード例 #2
0
ファイル: CategoryService.php プロジェクト: pavsuri/PARMT
 /**
  * Prepare the category  for persist.
  * 
  * @param \Vlreleases\UserBundle\Entity\Category $category
  * 
  * @return boolean
  */
 public function register($category)
 {
     if (!$category->getId()) {
         $category->setCreatedDate(new \DateTime());
     }
     $category->setLastModifiedDate(new \DateTime());
     $category->setAvailable(1);
     $category->setCreatedBy($this->getCurrentUser());
     $this->save($category);
 }