/**
  * {@inheritDoc}
  */
 public function getDeviceStatus()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'getDeviceStatus', array());
     return parent::getDeviceStatus();
 }
Esempio n. 2
0
 /**
  * 
  * @param \Vlreleases\UserBundle\Entity\MobileDevice $device
  * @return boolean
  */
 public function showRaiseHandOption(\Vlreleases\UserBundle\Entity\MobileDevice $device)
 {
     $queue = $this->mobileDeviceQueueRepository->findOneBy(array('mobileDevice' => $device, 'requester' => $this->getCurrentUser()));
     if ($device->getAvailable()) {
         return false;
     }
     if ($queue instanceof \Vlreleases\UserBundle\Entity\MobileDeviceQueue) {
         return false;
     }
     if ($this->getCurrentUser()->getId() == $device->getDeviceStatus()->getAssignee()->getId() && !$device->getDeviceStatus()->getEndTime() instanceof \DateTime) {
         return false;
     }
     return true;
 }