Class humhub\modules\user\models\ProfileField

Inheritancehumhub\modules\user\models\ProfileField » humhub\components\ActiveRecord » yii\db\ActiveRecord
ImplementsSerializable

This is the model class for table "profile_field".

Public Methods

Hide inherited methods

MethodDescriptionDefined By
afterSave() After Save, also saving the underlying Field Type humhub\modules\user\models\ProfileField
attributeLabels() humhub\modules\user\models\ProfileField
beforeDelete() Before deleting a profile field, inform underlying ProfileFieldType for cleanup. humhub\modules\user\models\ProfileField
beforeSave() humhub\components\ActiveRecord
checkInternalName() Validator which checks the given internal name. humhub\modules\user\models\ProfileField
checkType() Validator which checks the fieldtype humhub\modules\user\models\ProfileField
getCategory() humhub\modules\user\models\ProfileField
getCreatedBy() Relation to User defined in created_by attribute humhub\components\ActiveRecord
getErrorMessage() Returns the errors as string for all attribute or a single attribute. humhub\components\ActiveRecord
getFieldType() Returns the ProfileFieldType Class for this Profile Field humhub\modules\user\models\ProfileField
getFileManager() Returns the file manager for this record humhub\components\ActiveRecord
getFormDefinition() Returns The Form Definition to edit the ProfileField Model. humhub\modules\user\models\ProfileField
getTranslationCategory() Returns the translation category Defaults to: models_Profile humhub\modules\user\models\ProfileField
getUniqueId() Returns a unique id for this record/model humhub\components\ActiveRecord
getUpdatedBy() Relation to User defined in updated_by attribute humhub\components\ActiveRecord
getUserValue() Returns the users value for this profile field. humhub\modules\user\models\ProfileField
rules() humhub\modules\user\models\ProfileField
serialize() Serializes attributes and oldAttributes of this record. humhub\components\ActiveRecord
tableName() humhub\modules\user\models\ProfileField
unserialize() Unserializes the given string, calls the init() function and sets the attributes and oldAttributes. humhub\components\ActiveRecord

Method Details

afterSave() public method

After Save, also saving the underlying Field Type

public void afterSave ( $insert, $changedAttributes )
$insert
$changedAttributes
attributeLabels() public method

public array attributeLabels ( )
return array

Customized attribute labels (name=>label)

beforeDelete() public method

Before deleting a profile field, inform underlying ProfileFieldType for cleanup.

public void beforeDelete ( )
checkInternalName() public method

Validator which checks the given internal name.

Also ensures that internal_name could not be changed on existing records.

public void checkInternalName ( )
checkType() public method

Validator which checks the fieldtype

Also ensures that field_type_class could not be changed on existing records.

public void checkType ( )
getCategory() public method

public \yii\db\ActiveQuery getCategory ( )
getFieldType() public method

Returns the ProfileFieldType Class for this Profile Field

public humhub\modules\user\models\fieldtype\BaseType getFieldType ( )
throws \yii\base\Exception
getFormDefinition() public method

Returns The Form Definition to edit the ProfileField Model.

public array getFormDefinition ( )
return array

CForm Definition

getTranslationCategory() public method

Returns the translation category Defaults to: models_Profile

public string getTranslationCategory ( )
getUserValue() public method

Returns the users value for this profile field.

public \humhub\modules\user\models\type getUserValue ( humhub\modules\user\models\User $user, $raw true )
$user \humhub\modules\user\models\type
$raw \humhub\modules\user\models\type
rules() public method

public array rules ( )
return array

Validation rules for model attributes.

tableName() public static method

public static void tableName ( )