API::changeActiveEntities PHP Метод

changeActiveEntities() защищенный Метод

Change active entity to the entities_id one.
protected changeActiveEntities ( $params = [] ) : boolean
$params array with theses options : - 'entities_id': (default 'all') ID of the new active entity ("all" = load all possible entities). Optionnal - 'is_recursive': (default false) Also display sub entities of the active entity. Optionnal
Результат boolean
    protected function changeActiveEntities($params = array())
    {
        $this->initEndpoint();
        if (!isset($params['entities_id'])) {
            $params['entities_id'] = 'all';
        }
        if (!isset($params['is_recursive'])) {
            $params['is_recursive'] = false;
        }
        return Session::changeActiveEntities(intval($params['entities_id']), $params['is_recursive']);
    }