/** * {@inheritDoc} */ public function setCreatedDate($createdDate) { $this->__initializer__ && $this->__initializer__->__invoke($this, 'setCreatedDate', array($createdDate)); return parent::setCreatedDate($createdDate); }
/** * Prepare the mobile device for persist. * * @param \Vlreleases\UserBundle\Entity\MobileDevice $mobileDevice * * @return boolean */ public function register($mobileDevice) { if (!$mobileDevice->getId()) { $mobileDevice->setCreatedDate(new \DateTime()); } $mobileDevice->setLastModifiedDate(new \DateTime()); $mobileDevice->setAvailable(1); $mobileDevice->setCreatedBy($this->getCurrentUser()); $this->save($mobileDevice); }