Class humhub\modules\user\models\fieldtype\Date

Inheritancehumhub\modules\user\models\fieldtype\Date » humhub\modules\user\models\fieldtype\BaseType » yii\base\Model
Available since version1.0.0-beta.4

Date Field

Public Methods

Hide inherited methods

MethodDescriptionDefined By
addFieldType() Add new FieldType to stack humhub\modules\user\models\fieldtype\BaseType
addToProfileTable() Adds the new profile type to the profile table. humhub\modules\user\models\fieldtype\BaseType
beforeProfileSave() This method is called before the field value is stored in Profile table. humhub\modules\user\models\fieldtype\BaseType
delete() Deletes a Profile Field Type humhub\modules\user\models\fieldtype\BaseType
getFieldFormDefinition() Return the Form Element to edit the value of the Field humhub\modules\user\models\fieldtype\Date
getFieldRules() Returns validation rules for field type. humhub\modules\user\models\fieldtype\Date
getFieldTypes() Returns a list of all available field type classes. humhub\modules\user\models\fieldtype\BaseType
getFormDefinition() Returns the Edit Form for administrators this Field Type. humhub\modules\user\models\fieldtype\Date
getLabels() Return array of Labels for Field humhub\modules\user\models\fieldtype\BaseType
getTypeInstances() Returns an array of instances of all available field types. humhub\modules\user\models\fieldtype\BaseType
getUserValue() Returns the value of a given user of this field humhub\modules\user\models\fieldtype\Date
loadDefaults() Load field type default settings to the profile humhub\modules\user\models\fieldtype\BaseType
loadFieldConfig() Loads the profile field type settings humhub\modules\user\models\fieldtype\BaseType
save() Saves the profile field type humhub\modules\user\models\fieldtype\Date
setProfileField() Links a ProfileField to the ProfileFieldType. humhub\modules\user\models\fieldtype\BaseType
validate() Validates a ProfileFieldType humhub\modules\user\models\fieldtype\BaseType

Method Details

getFieldFormDefinition() public method

Return the Form Element to edit the value of the Field

public array getFieldFormDefinition ( )
getFieldRules() public method

Returns validation rules for field type.

The inherited field type class should pass his rules to this method.

public array getFieldRules ( $rules = [] )
$rules array
return array


getFormDefinition() public method

Returns the Edit Form for administrators this Field Type.

This method should be overwritten by the file type class.

public array getFormDefinition ( $definition = [] )
$definition array
return array

Of Form Definition

getUserValue() public method

Returns the value of a given user of this field

public string getUserValue ( $user, $raw true )
$user humhub\modules\user\models\User
$raw boolean
save() public method

Saves the profile field type

The settings/configuration for a ProfileFieldType are saved in ProfileField in attribute "field_type_config" as JSON data.

The ProfileFieldType Class itself can overwrite this behavior.

public void save ( )
throws \yii\base\Exception