コード例 #1
0
 /**
  * {@inheritDoc}
  */
 public function getCategory()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'getCategory', array());
     return parent::getCategory();
 }
コード例 #2
0
ファイル: ProductService.php プロジェクト: pavsuri/PARMT
 /**
  * 
  * @param \Vlreleases\UserBundle\Entity\Product $device
  * @return boolean
  */
 public function showRaiseHandOption(\Vlreleases\UserBundle\Entity\Product $device)
 {
     $queue = $this->productQueueRepository->findOneBy(array('product' => $device, 'requester' => $this->getCurrentUser()));
     if ($device->getAvailable()) {
         return false;
     }
     if ($queue instanceof \Vlreleases\UserBundle\Entity\ProductQueue) {
         return false;
     }
     if ($device->getDeviceStatus()) {
         if ($this->getCurrentUser()->getId() == $device->getDeviceStatus()->getAssignee()->getId() && !$device->getDeviceStatus()->getSubmittedTime() instanceof \DateTime) {
             return false;
         }
     }
     return true;
 }