Class yii\debug\models\search\User
Inheritance | yii\debug\models\search\User » yii\base\Model |
---|---|
Available since extension's version | 2.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
Property | Type | Description | Defined By |
---|---|---|---|
$identityImplement | \yii\base\Model | Implementation of IdentityInterface | yii\debug\models\search\User |
Public Methods
Property Details
Implementation of IdentityInterface
Method Details
public void __get ( $name ) | ||
$name |
public function __get($name)
{
return $this->identityImplement->__get($name);
}
public void __set ( $name, $value ) | ||
$name | ||
$value |
public function __set($name, $value)
{
return $this->identityImplement->__set($name, $value);
}
public void attributes ( ) |
public function attributes()
{
return $this->identityImplement->attributes();
}
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();
}
public void rules ( ) |
public function rules()
{
return [[array_keys($this->identityImplement->getAttributes()), 'safe']];
}
public void search ( $params ) | ||
$params | ||
throws | \yii\base\InvalidConfigException |
---|
public function search($params)
{
if ($this->identityImplement instanceof ActiveRecord) {
return $this->searchActiveDataProvider($params);
}
return null;
}