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