コード例 #1
0
 /**
  * {@inheritDoc}
  */
 public function getRole()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'getRole', array());
     return parent::getRole();
 }
コード例 #2
0
 public function getAvailableServices(\Application\Entity\User $user)
 {
     $userRole = $user->getRole();
     $findBy = array();
     if (!$this->aclService->isAllowed($userRole->getName(), "accessAllServices")) {
         $userId = $user->getId();
         $findBy = array("user" => $userId);
     }
     $rows = $this->doctrineService->getRepository('Application\\Entity\\WorkAt')->findBy($findBy);
     $result = array();
     foreach ($rows as $row) {
         array_push($result, $row->getService());
     }
     return $result;
 }