Obtenir une liste des profils

@return array
182932
public function getArrayListeProfils()
    {
        $retour=array();
        $req = "SELECT idProfil,libelle FROM droitsProfils";
        $res = $this->connexionBdd->requete($req);
        while ($fetch = mysql_fetch_assoc($res)) {
            $retour[$fetch['idProfil']]=$fetch['libelle'];
        }
        return $retour;
    }
588166
public function list_radius_profiles()
    {
        if (!$this->is_loggedin) {
            return false;
        }

        $response = $this->exec_curl('/api/s/' . $this->site . '/rest/radiusprofile');

        return $this->process_response($response);
    }
1042277
protected function getListPage()
    {
        $conditions = $this->query_filter;
        $conditions['limit'] = $this->data_limit;

        $list = (array) $this->page->getList($conditions);
        $this->prepareListPage($list);
        return $list;
    }
97563
public function getTaskList()
    {
        $tasks = $this->loader->loadTasks();

        return array_map(function (Task $task) {
            return $task->getName();
        }, $tasks);
    }
828241
public static function toList()
    {
        $class = static::class;
        if (!array_key_exists($class, self::$cache)) {
            $reflection = new \ReflectionClass($class);
            self::$cache[$class] = $reflection->getConstants();
        }

        return self::$cache[$class];
    }
180186
public function getList()
    {
        if (!userHasPermission('admin:cdn:manager:object:browse')) {
            throw new ApiException(
                'You do not have permission to access this resource',
                $oHttpCodes::STATUS_UNAUTHORIZED
            );
        }

        $oInput       = Factory::service('Input');
        $oObjectModel = Factory::model('Object', 'nails/module-cdn');
        $iBucketId    = (int) $oInput->get('bucket_id') ?: null;
        $iPage        = (int) $oInput->get('page') ?: 1;

        if (empty($iBucketId)) {
            throw new ApiException(
                '`bucket_id` is a required field',
                $oHttpCodes::STATUS_BAD_REQUEST
            );
        }

        $aObjects = $oObjectModel->getAll(
            $iPage,
            static::CONFIG_OBJECTS_PER_PAGE,
            ['where' => [['bucket_id', $iBucketId]]]
        );

        return Factory::factory('ApiResponse', 'nails/module-api')
            ->setData(array_map(
                function ($oObj) {
                    $oObj->url->preview = $oObj->is_img ? cdnCrop($oObj->id, 400, 400) : null;
                    return $oObj;
                },
                $aObjects
            ))
            ->setMeta([
                'page'     => $iPage,
                'per_page' => static::CONFIG_OBJECTS_PER_PAGE,
            ]);
    }
569092
public function getList()
    {
        $routeMatch = $this->getEvent()->getRouteMatch();
        $mode = $this->params('mode', false);
        $type = $this->params('type', false);
        $endpoint = $this->params('endpoint', false);
        $annee = $this->params('annee', 0);
        $processHandler = $this->getProcessStateHandler();
        $executions = $processHandler->getProcessExecutions($mode, $type, $endpoint, $annee);
        if ($executions instanceof \Doctrine\ORM\PersistentCollection)
            $executions = $executions->toArray();
        usort($executions, function (Execution $a, Execution $b)
        {
            return intval($a->getId()) < intval($b->getId());
        });
        $response = $this->getResponse();
        $response->getHeaders()->addHeaderLine('Content-Type', 'application/json');
        $serializer = $this->getSerializer();
        $processJson = $serializer->serialize($executions, 'json');
        $response->setContent($processJson);
        return $response;
    }
508969
public static function loadAll()
  {
    $list = [];
    foreach (self::getProfileList() as $definition) {
      $list[$definition['name']] = self::loadProfileByName($definition['name']);
    }
    return $list;
  }
1157729
private function perfis()
    {
        $dados  = [];
        $perfis = $this
            ->getDoctrine()
            ->getRepository(Perfil::class)
            ->findBy([], [ 'nome' => 'ASC' ]);
        
        foreach ($perfis as $perfil) {
            $dados[$perfil->getId()] = [
                'perfil'     => $perfil->getNome(),
                'permissoes' => $perfil->getModulos(),
            ];
        }

        return $dados;
    }
967929
public function getProfileSegments()
    {
        $profileSegments = $this
                    ->serviceHelper
                    ->getService()
                    ->management_segments
                    ->listManagementSegments()
                    ->items;

        $builtin = array();
        $own = array();
        foreach ($profileSegments as $segment) {
            if ($segment->type == 'BUILT_IN') {
                $builtin[] = array(
                        'name' => $segment->name,
                        'query' => $segment->segmentId,
                    );
            } else {
                $own[] = array(
                        'name' => $segment->name,
                        'query' => $segment->segmentId,
                    );
            }
        }

        return array('builtin' => $builtin, 'own' => $own);
    }
885646
public function actionIndex()
    {
        
        if($this->searchClass === null){
            $searchModel = new AssigmentSearch;
        }  else {
            $class = $this->searchClass;
            $searchModel = new $class;
        }       

        $dataProvider = $searchModel->search(\Yii::$app->request->getQueryParams(), $this->userClassName, $this->usernameField);
        return $this->render('index', [
                'dataProvider' => $dataProvider,
                'searchModel' => $searchModel,
                'idField' => $this->idField,
                'usernameField' => $this->usernameField,
        ]);
    }
244463
function getProfile() {

		$profile['users_id'] = $this->userId;
		foreach ( $this->profileMetaKeys as $key => $type ) {
			$profile[ $key ] = get_user_meta( $this->userId, $key, true );
		}

		return $profile;
	}
1320231
public function getAllProfilesAction()
    {
        $profiles = [];
        /** @var Repository $repo */
        $repo = $this->get($this->getParameter('ongr_settings.repo'));

        $search = $repo->createSearch();
        $search->addAggregation(new TermsAggregation('profiles', 'profile'));

        /** @var DocumentIterator $result */
        $result = $repo->findDocuments($search);

        /** @var AggregationValue $agg */
        foreach ($result->getAggregation('profiles') as $agg) {
            $profiles[] = $agg->getValue('key');
        }

        if (empty($profiles) || !in_array('default', $profiles)) {
            array_unshift($profiles, 'default');
        }

        return new JsonResponse($profiles);
    }
46589
public function getActiveProfiles()
    {
        if ($this->cache->contains($this->activeProfilesSettingName)) {
            $profiles = $this->cache->fetch($this->activeProfilesSettingName);
        } else {
            $profiles = [];
            $allProfiles = $this->getAllProfiles();

            foreach ($allProfiles as $profile) {
                if (!$profile['active']) {
                    continue;
                }

                $profiles[] = $profile['name'];
            }

            $this->cache->save($this->activeProfilesSettingName, $profiles);
        }

        $profiles = array_merge($profiles, $this->activeProfilesList);

        return $profiles;
    }
866583
public function getSocialMediaProfiles()
    {
        $socialMediaProfiles = [];
        if ($this->entity->getSocialMediaProfiles()) {
            foreach ($this->entity->getSocialMediaProfiles() as $socialMediaProfile) {
                $socialMediaProfiles[] = $socialMediaProfile;
            }
        }

        return $socialMediaProfiles;
    }
172527
public function profilePropertiesAction()
    {
        $platformRoles = $this->roleManager->getPlatformNonAdminRoles(false);
        $labels = User::getEditableProperties();
        $properties = $this->profilePropertyManager->getAllProperties();

        return array(
            'platformRoles' => $platformRoles,
            'labels'        => $labels,
            'properties'     => $properties
        );
    }
869426
protected function getCredentialsLists() {
        if (!$this->_credentialsLists) {
            $this->_credentialsLists = new CredentialListList($this->version, $this->solution['sid']);
        }

        return $this->_credentialsLists;
    }