Class dektrium\user\models\Profile

Inheritancedektrium\user\models\Profile » yii\db\ActiveRecord
Uses Traitsdektrium\user\traits\ModuleTrait

This is the model class for table "profile".

Protected Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$module dektrium\user\Module dektrium\user\models\Profile

Property Details

$module protected property
protected dektrium\user\Module $module null

Method Details

attributeLabels() public method

public void attributeLabels ( )
beforeSave() public method

public void beforeSave ( $insert )
$insert
getAvatarUrl() public method

Returns avatar url or null if avatar is not set.

public string|null getAvatarUrl ( $size 200 )
$size int
getTimeZone() public method

Get the user's time zone.

Defaults to the application timezone if not specified by the user.

public DateTimeZone getTimeZone ( )
getUser() public method

public \yii\db\ActiveQueryInterface getUser ( )
init() public method

public void init ( )
rules() public method

public void rules ( )
setTimeZone() public method

Set the user's time zone.

public void setTimeZone ( DateTimeZone $timeZone )
$timeZone
tableName() public static method

public static void tableName ( )
toLocalTime() public method

Converts DateTime to user's local time

public DateTime toLocalTime ( DateTime $dateTime null )
$dateTime
validateTimeZone() public method

Validates the timezone attribute.

Adds an error when the specified time zone doesn't exist.

public void validateTimeZone ( $attribute, $params )
$attribute string

The attribute being validated

$params array

Values for the placeholders in the error message