Class yii\debug\models\search\User

Inheritanceyii\debug\models\search\User » yii\base\Model
Available since extension's version2.0.10
Source Code https://github.com/yiisoft/yii2-debug/blob/master/src/models/search/User.php

Search model for implementation of IdentityInterface

Public Properties

Hide inherited properties

Property Type Description Defined By
$identityImplement \yii\base\Model Implementation of IdentityInterface yii\debug\models\search\User

Property Details

Hide inherited properties

$identityImplement public property

Implementation of IdentityInterface

public \yii\base\Model $identityImplement null

Method Details

Hide inherited methods

__get() public method

public void __get ( $name )
$name

                public function __get($name)
{
    return $this->identityImplement->__get($name);
}

            
__set() public method

public void __set ( $name, $value )
$name
$value

                public function __set($name, $value)
{
    return $this->identityImplement->__set($name, $value);
}

            
attributes() public method

public void attributes ( )

                public function attributes()
{
    return $this->identityImplement->attributes();
}

            
init() public method

public void init ( )

                public function init()
{
    if (\Yii::$app->user && \Yii::$app->user->identityClass) {
        $identityImplementation = new \Yii::$app->user->identityClass();
        if ($identityImplementation instanceof Model) {
            $this->identityImplement = $identityImplementation;
        }
    }
    parent::init();
}

            
rules() public method

public void rules ( )

                public function rules()
{
    return [[array_keys($this->identityImplement->getAttributes()), 'safe']];
}

            
search() public method

public void search ( $params )
$params
throws \yii\base\InvalidConfigException

                public function search($params)
{
    if ($this->identityImplement instanceof ActiveRecord) {
        return $this->searchActiveDataProvider($params);
    }
    return null;
}