Exemple #1
0
 /**
  * @param mixed $roles
  *
  * @return array
  */
 public function getUserRoles($roles = null)
 {
     $roleArray = array();
     if ($roles === null) {
         $roles = $this->activePreference->getSecurityContext()->getToken()->getRoles();
         foreach ($roles as $role) {
             $roleArray[] = $role->getRole();
         }
         $roles = $roleArray;
     }
     return array_unique($roles);
 }
 /**
  * @return \PGS\CoreDomainBundle\Model\AcademicYear\AcademicYear|null
  */
 public function getAcademicYear()
 {
     return $this->activePreferenceContainer->getAcademicYearPreference();
 }