app\models\User::getPreference PHP 메소드

getPreference() 공개 메소드

Get a preference item of the current user.
public getPreference ( string $key ) : string | null
$key string
리턴 string | null
    public function getPreference($key)
    {
        // We can't use $this->preferences directly, since the data has been tampered
        // by getPreferencesAttribute().
        return array_get((array) unserialize($this->attributes['preferences']), $key);
    }