Получение аттрибутов
@return array
@throws \yii\base\Exception
346628
protected function initUserAttributes()
    {
        $attributes = $this->api('users.get.json', 'GET', [
            'fields' => implode(',', [
                'uid',
                'first_name',
                'last_name',
                'photo_200',
                'sex'
            ]),
        ]);

        $attributes = array_shift($attributes['response']);

        $return_attributes = [
            'User' => [
                $this->first_name   => $attributes['first_name'],
                $this->last_name    => $attributes['last_name'],
                $this->avatar       => $attributes['photo_200'],
                $this->gender       => $this->normalizeSex()[$attributes['sex']],
                $this->email        => (isset($this->accessToken->params['email'])) ? $this->accessToken->params['email'] : null,
                $this->status       => $this->statusActive,
            ],
            'provider_user_id' => $attributes['uid'],
            'provider_id' => UserOauthKey::getAvailableClients()['vkontakte'],
            'page' => $attributes['uid'],
        ];

        return $return_attributes;
    }
477140
public function toArray()
    {
        return array(
            'id' => $this->getId(),
            'rule' => $this->getRule(),
            'description' => $this->getDescription(),
            'tags' => implode(', ', $this->getTags()),
            'impact' => $this->getImpact()
        );
    }
176789
public function behaviors() {

        return [
            'rbac' => [
                'class' => Yii::$app->cmgCore->getRbacFilterClass(),
                'actions' => [
	                'index' => [ 'permission' => CoreGlobal::PERM_USER ],
	                'update' => [ 'permission' => CoreGlobal::PERM_USER ]
                ]
            ],
            'verbs' => [
                'class' => VerbFilter::className(),
                'actions' => [
                    'index' => [ 'get' ],
                    'update' => [ 'get', 'post' ]
                ]
            ]
        ];
    }
1061139
public function attributeLabels()
    {
        return array_merge(parent::attributeLabels(), [
            'username'        => Yii::t('usr', 'Username'),
            'email'            => Yii::t('usr', 'Email'),
            'activationKey'    => Yii::t('usr', 'Activation Key'),
        ], $this->getBehaviorLabels());
    }
1372489
public function run()
    {
        Yii::$app->response->format = Response::FORMAT_JSON;

        $ids = Yii::$app->request->post('ids');

        LanguageSource::deleteAll(['id' => (array) $ids]);

        return [];
    }
773998
public function rules() {

		$rules = [
			// Required, Safe
			[ [ 'firstName', 'lastName', 'email' ], 'required' ],
			[ 'phone', 'required', 'on' => [ 'phone', 'phone-captcha' ] ],
			// Text Limit
			[ [ 'email', 'phone' ], 'string', 'min' => 1, 'max' => Yii::$app->core->xLargeText ],
			// Other
			[ 'email', 'email' ]
		];

		if( empty( $this->captchaAction ) ) {

			$this->captchaAction	= '/cart/cart/captcha';
		}

		$rules[] = [ 'captcha', 'captcha', 'captchaAction' => $this->captchaAction, 'on' => [ 'captcha', 'phone-captcha' ] ];

		if( Yii::$app->core->trimFieldValue ) {

			$trim[] = [ [ 'firstName', 'lastName', 'email', 'phone' ], 'filter', 'filter' => 'trim', 'skipOnArray' => true ];

			return ArrayHelper::merge( $trim, $rules );
		}

		return $rules;
	}
704271
public function coreComponents()
    {
        return ArrayHelper::merge(parent::coreComponents(), [
            'db' => [
                'class' => 'yii\db\Connection',
                'dsn' => getenv('DB_DSN'),
                'username' => getenv('DB_USER'),
                'password' => getenv('DB_PASSWORD'),
                'charset' => 'utf8',
                'tablePrefix' => getenv('DB_TABLE_PREFIX'),
                'enableSchemaCache' => YII_ENV_PROD ? true : false,
            ],
        ]);
    }
451991
public function getJsTranslations()
    {
        $translations = [];
        foreach ($this->_jsTranslations as $module => $data) {
            foreach ($data as $key) {
                $translations[$key] = Yii::t($module, $key, [], Yii::$app->language);
            }
        }
        return $translations;
    }
317569
public function actionIndex()
    {
        $dynamicModel = $this->createAuditForm();
        $auditForm = new AuditForm;
        $auditForm->addFormValidators($dynamicModel);
        $dataProvider = null;
        $arrayDiff = [];
        /** @var Module $module */
        $module = $this->module;
        if ($dynamicModel->load(Yii::$app->request->get()) && $dynamicModel->validate()) {
            $this->setCurrentModel($dynamicModel->table);
            $this->hiddenColumns = array_merge(
                $module->auditColumns,
                $module->tables[$dynamicModel->table]['hiddenColumns']
            );
            $dataProvider = $this->createDataProvider($dynamicModel);
            $arrayDiff = [];
            $previousModel = null;
            foreach ($dataProvider->getModels() as $model) {
                $auditId = $model['audit_id'];
                $model = $this->unsetHiddenColumns($model);
                $arrayDiff[$auditId] = $this->createDiff($model, $dynamicModel, $previousModel, $auditId);
                $previousModel = $model;
            }
        }
        return $this->render('index', [
            'model' => $dynamicModel,
            'dataProvider' => $dataProvider,
            'arrayDiff' => $arrayDiff,
            'fields' => $auditForm->getFormFields($dynamicModel),
            'hiddenColumns' => $this->hiddenColumns,
        ]);
    }
75026
public function defaultAttributeLabels()
    {
        return [
            'id' => Yii::t('hipanel', 'ID'),
            'remoteid' => Yii::t('hipanel', 'Remote ID'),
            'client' => Yii::t('hipanel', 'Client'),
            'client_id' => Yii::t('hipanel', 'Client'),
            'seller' => Yii::t('hipanel', 'Reseller'),
            'seller_id' => Yii::t('hipanel', 'Reseller'),
            'domain' => Yii::t('hipanel', 'Domain name'),
            'hdomain' => Yii::t('hipanel', 'Domain name'),
            'ns' => Yii::t('hipanel', 'Name Server'),
            'nss' => Yii::t('hipanel', 'Name Servers'),
            'server' => Yii::t('hipanel', 'Server'),
            'account' => Yii::t('hipanel', 'Account'),
            'service' => Yii::t('hipanel', 'Service'),
            'tariff' => Yii::t('hipanel', 'Tariff'),
            'contact' => Yii::t('hipanel', 'Contact'),
            'article' => Yii::t('hipanel', 'Article'),
            'host' => Yii::t('hipanel', 'Host'),
            'bill' => Yii::t('hipanel', 'Bill'),
            'backup' => Yii::t('hipanel', 'Backup'),
            'backuping' => Yii::t('hipanel', 'Backuping'),
            'crontab' => Yii::t('hipanel', 'Crontab'),
            'ip' => Yii::t('hipanel', 'IP'),
            'ips' => Yii::t('hipanel', 'IPs'),
            'mail' => Yii::t('hipanel', 'Mail'),
            'request' => Yii::t('hipanel', 'Request'),
            'db' => Yii::t('hipanel', 'Database'),
            'state' => Yii::t('hipanel', 'Status'),
            'status' => Yii::t('hipanel', 'Status'),
            'states' => Yii::t('hipanel', 'Statuses'),
            'type' => Yii::t('hipanel', 'Type'),
            'types' => Yii::t('hipanel', 'Types'),
            'note' => Yii::t('hipanel', 'Note'),
            'descr' => Yii::t('hipanel', 'Description'),
            'comment' => Yii::t('hipanel', 'Comment'),
            'created_date' => Yii::t('hipanel', 'Registered'),
            'updated_date' => Yii::t('hipanel', 'Last update'),
        ];
    }
974744
public static function getSavedRoutes()
    {
        $result = [];
        foreach (Yii::$app->getAuthManager()->getPermissions() as $name => $value) {
            if ($name[0] === '/' && substr($name, -1) != '*') {
                $result[] = $name;
            }
        }

        return $result;
    }
890558
public function rules() {

		$rules = [
			[ [ 'widgetId', 'htmlOptions', 'icon', 'order' ], 'safe' ],
			[ 'widget', 'boolean' ],
			[ 'order', 'number', 'integerOnly' => true ]
		];

		if( Yii::$app->core->trimFieldValue ) {

			$trim[] = [ [ 'htmlOptions', 'icon' ], 'filter', 'filter' => 'trim', 'skipOnArray' => true ];

			return ArrayHelper::merge( $trim, $rules );
		}

		return $rules;
	}
911406
protected function getFlashes()
    {
        /* @var $session \yii\web\Session */
        $session = Yii::$app->has('session', true) ? Yii::$app->get('session') : null;
        if ($session === null || !$session->getIsActive()) {
            return [];
        }

        $counters = $session->get($session->flashParam, []);
        $flashes = [];
        foreach (array_keys($counters) as $key) {
            if (array_key_exists($key, $_SESSION)) {
                $flashes[$key] = $_SESSION[$key];
            }
        }
        return $flashes;
    }
600328
protected function getCommandDescriptions()
    {
        $commands = [];
        foreach ($this->getCommands() as $command) {
            $actions = [];
            $result = Yii::$app->createController($command);
            if ($result !== false && $result[0] instanceof \Hprose\Yii\Controller) {
                list($controller) = $result;
                /** @var Controller $controller */
                $actions = $this->getActions($controller);
            }

            $commands[$command] = $actions;
        }

        return $commands;
    }
137655
public function safeAttributes()
    {
        $t = Yii::createObject($this->getTranslationModelClassName());
        return ArrayHelper::merge(parent::safeAttributes(), $t->safeAttributes());
    }
784371
public function actionIndex()
    {
        $request = \Yii::$app->request;
        if ($request->getIsOptions()) {
            return $this->ResponseOptions($this->verbs()['index']);
        }
        try{
            return Menu::getPageMenus(Yii::$app->request->queryParams);

        }catch(Exception $e)
        {
            throw new Exception($e);
        }



    }
227612
protected function getBaseTemplateParams()
    {
        return ArrayHelper::merge($this->baseTemplateParams, [
            'homeUrl' => Yii::$app->urlManager->baseUrl,
            'siteName' => Yii::$app->name,
        ]);
    }