/*public function actions()
{
return [
'info' => [
'class' => 'yii2lab\domain\rest\UniAction',
'service' => Yii::$app->user,
'successStatusCode' => 200,
'serviceMethod' => 'getIdentity',
],
'options' => [
'class' => 'yii\rest\OptionsAction',
],
];
}
179333
public function actionRegister()
	{
		
		$store = new StoreFile(ROOT_DIR . '/rr.json');
		$all = $store->load();
		$all[] = \Yii::$app->request->queryParams;
		$store->save($all);
		return \Yii::$app->request->queryParams;
	}
641569
public function indexAction()
    {
        $this->checkAccess();

        $allowWorkspace = $this->configHandler->getParameter('allow_workspace_at_registration');

        $data = [
            'facets' => $this->profileSerializer->serialize([Options::REGISTRATION]),
            'termOfService' => $this->configHandler->getParameter('terms_of_service') ?
                $this->tosManager->getTermsOfService() : null,
            'options' => [
                'autoLog' => $this->configHandler->getParameter('auto_logging'),
                'localeLanguage' => $this->configHandler->getParameter('locale_language'),
                'defaultRole' => $this->configHandler->getParameter('default_role'),
                'redirectAfterLoginOption' => $this->configHandler->getParameter('redirect_after_login_option'),
                'redirectAfterLoginUrl' => $this->configHandler->getParameter('redirect_after_login_url'),
                'userNameRegex' => $this->configHandler->getParameter('username_regex'),
                'forceOrganizationCreation' => $this->configHandler->getParameter('force_organization_creation'),
                'allowWorkspace' => $allowWorkspace,
            ],
        ];

        return $data;
    }
974744
public static function getSavedRoutes()
    {
        $result = [];
        foreach (Yii::$app->getAuthManager()->getPermissions() as $name => $value) {
            if ($name[0] === '/' && substr($name, -1) != '*') {
                $result[] = $name;
            }
        }

        return $result;
    }
199414
public static function getStatusesArray() : array
    {
        return [
            self::STATUS_BLOCKED => Yii::t('setrun/user', 'Blocked'),
            self::STATUS_ACTIVE  => Yii::t('setrun/user', 'Active'),
            self::STATUS_WAIT    => Yii::t('setrun/user', 'Wait')
        ];
    }
334170
public function actionStatus($id)
    {
        $model = $this->findModel($id);
        if($model->status == "active") {
            $model->status = "inactive";
        } else {
            $model->status = "active";
        }
        $model->save(false);
        if(Yii::$app->request->getIsAjax()) {
            Yii::$app->response->format = 'json';
            return ['success' => true];
        } else {
            return $this->redirect(['index']);
        }
    }
303242
public function info()
    {
        return [
            'gerrit' => [
                'hostUri' => $this->hostUri,
                'gerritProject' => $this->gerritProject,
                'revisionId' => $this->revisionId,
                'aliasContext' => $this->aliasContext->info()
            ]
        ];
    }
488833
protected function defaultActionStruct()
    {
        return [
            'ident'         => null,
            'priority'      => null,
            'permissions'   => [],
            'condition'     => null,
            'active'        => true,
            'empty'         => false,
            'label'         => null,
            'showLabel'     => true,
            'icon'          => null,
            'url'           => null,
            'name'          => null,
            'value'         => null,
            'target'        => null,
            'isText'        => false,
            'isLink'        => false,
            'isButton'      => true,
            'isHeader'      => false,
            'isSubmittable' => false,
            'isSeparator'   => false,
            'cssClasses'    => null,
            'actionType'    => 'dark',
            'buttonType'    => 'button',
            'splitButton'   => false,
            'hasActions'    => false,
            'actions'       => [],
        ];
    }
571299
public function actionList()
    {
        $searchModel = new SearchFavoriteProduct();
        $dataProvider = $searchModel->search(Yii::$app->request->queryParams);

        return $this->render('list', [
            'searchModel' => $searchModel,
            'dataProvider' => $dataProvider,
        ]);
    }
791442
public function actionCheckname(){
        $request = \Yii::$app->request;
        if ($request->getIsOptions()) {
            return $this->ResponseOptions($this->verbs()['checkname']);
        }
        $model = new BizRule(null);
        $mo =$model->find(Yii::$app->request->post()['BizRule']['name']);
        if($mo==null){
            return ['message'=>true];
        }else{
            return ['message'=>false];
        }

    }
1174386
public function getDefaultActions()
    {
        /** @var ActiveController $owner */
        $owner = $this->owner;

        $defaultActions = $owner->actions();
        // set default indexes to avoid many isset() calls later
        $actions = [
            'index' => false,
            'view' => false,
            'print' => false,
            'update' => false,
            'delete' => false,
            'toggle' => false,
            'history' => false,
            'help' => false,
            'state' => false,
        ];
        $availableActions = array_merge($actions, $defaultActions);
        foreach ($availableActions as $action => $enabled) {
            $availableActions[$action] = $enabled && in_array($action, $this->buttons);
        }
        return $availableActions;
    }
318601
public function behaviors()
    {
        $behaviors = parent::behaviors();
        $behaviors['authenticator'] = [
            'class' => CompositeAuth::class,
            'authMethods' => $this->authMethods,
        ];
        $behaviors['corsFilter'] = [
            'class' => \yii\filters\Cors::class,
            'cors' => [
                // restrict access to
                'Origin' => ['*'],
                'Access-Control-Request-Method' => ['POST', 'PUT', 'GET'],
                // Allow only POST and PUT methods
                'Access-Control-Request-Headers' => ['*'],
                // Allow only headers 'X-Wsse'
                'Access-Control-Allow-Credentials' => true,
                // Allow OPTIONS caching
                'Access-Control-Max-Age' => 3600,
                // Allow the X-Pagination-Current-Page header to be exposed to the browser.
                'Access-Control-Expose-Headers' => ['X-Pagination-Current-Page'],
            ],
        ];
        return $behaviors;
    }
1258165
public function getDashboardActions()
    {
        $actions = [];

        if ($this->hasRoute('create') && $this->hasAccess('create')) {
            $actions['create'] = [
                'label' => 'link_add',
                'translation_domain' => 'SonataAdminBundle',
                // NEXT_MAJOR: Remove this line and use commented line below it instead
                'template' => $this->getTemplate('action_create'),
                // 'template' => $this->getTemplateRegistry()->getTemplate('action_create'),
                'url' => $this->generateUrl('create'),
                'icon' => 'plus-circle',
            ];
        }

        if ($this->hasRoute('list') && $this->hasAccess('list')) {
            $actions['list'] = [
                'label' => 'link_list',
                'translation_domain' => 'SonataAdminBundle',
                'url' => $this->generateUrl('list'),
                'icon' => 'list',
            ];
        }

        return $actions;
    }
549371
public function listActions() {
		$parentClassMethods = get_class_methods(get_parent_class($this->Controller));
		$subClassMethods = get_class_methods($this->Controller);
		$classMethods = array_diff($subClassMethods, $parentClassMethods);
		foreach ($classMethods as $key => $classMethod) {
			if (mb_substr($classMethod, 0, 1) === '_') {
				unset($classMethods[$key]);
			}
		}
		return $classMethods;
	}
843262
public function getItems()
    {
        $manager = Yii::$app->getAuthManager();
        $avaliable = [];
        foreach (array_keys($manager->getRoles()) as $name) {
            $avaliable[$name] = 'role';
        }

        foreach (array_keys($manager->getPermissions()) as $name) {
            if ($name[0] != '/') {
                $avaliable[$name] = 'permission';
            }
        }

        $assigned = [];
        foreach ($manager->getAssignments($this->id) as $item) {
            $assigned[$item->roleName] = $avaliable[$item->roleName];
            unset($avaliable[$item->roleName]);
        }

        return [
            'avaliable' => $avaliable,
            'assigned' => $assigned
        ];
    }
265056
public static function getStatuses()
    {
        return [
            self::STATUS_ACTIVE => Yii::t('podium/view', 'Active'),
            self::STATUS_BANNED => Yii::t('podium/view', 'Banned'),
            self::STATUS_REGISTERED => Yii::t('podium/view', 'Registered'),
        ];
    }
924279
public function actionDataModules()
    {
        $data = [];
        foreach (Yii::$app->getFrontendModules() as $k => $f) {
            $data[] = ['value' => $k, 'label' => $k];
        }
        return $data;
    }
1347500
public static function getUserStatusList()
    {
        return [
            IdentityInterface::STATUS_FORBIDDEN => Yii::t('wocenter/app', 'User disabled status'),
            IdentityInterface::STATUS_ACTIVE => Yii::t('wocenter/app', 'User active status'),
            IdentityInterface::STATUS_LOCKED => Yii::t('wocenter/app', 'User locked status'),
            IdentityInterface::STATUS_DELETED => Yii::t('wocenter/app', 'User deleted status'),
        ];
    }