/**
  * {@inheritDoc}
  */
 public function getCreatedBy()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'getCreatedBy', array());
     return parent::getCreatedBy();
 }
Beispiel #2
0
 /**
  * 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);
 }