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