Class humhub\modules\user\models\fieldtype\Text

Inheritancehumhub\modules\user\models\fieldtype\Text » humhub\modules\user\models\fieldtype\BaseType » yii\base\Model
Available since version0.5

ProfileFieldTypeText handles text profile fields.

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\BaseType
getFieldRules() Returns the Field Rules, to validate users input humhub\modules\user\models\fieldtype\Text
getFieldTypes() Returns a list of all available field type classes. humhub\modules\user\models\fieldtype\BaseType
getFormDefinition() Returns Form Definition for edit/create this field. humhub\modules\user\models\fieldtype\Text
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() humhub\modules\user\models\fieldtype\Text
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
rules() Rules for validating the Field Type Settings Form humhub\modules\user\models\fieldtype\Text
save() Saves this Profile Field Type humhub\modules\user\models\fieldtype\Text
setProfileField() Links a ProfileField to the ProfileFieldType. humhub\modules\user\models\fieldtype\BaseType
validate() Validates a ProfileFieldType humhub\modules\user\models\fieldtype\BaseType

Constants

Hide inherited constants

ConstantValueDescriptionDefined By
VALIDATOR_EMAIL "email" humhub\modules\user\models\fieldtype\Text
VALIDATOR_URL "url" humhub\modules\user\models\fieldtype\Text

Property Details

$default public property
public String $default null
$maxLength public property
public Integer $maxLength 255
$minLength public property
public Integer $minLength null
$regexp public property
public String $regexp null
$regexpErrorMessage public property
public String $regexpErrorMessage null
$validator public property
public String $validator null

Method Details

getFieldRules() public method

Returns the Field Rules, to validate users input

public \humhub\modules\user\models\fieldtype\type getFieldRules ( $rules = [] )
$rules \humhub\modules\user\models\fieldtype\type
getFormDefinition() public method

Returns Form Definition for edit/create this field.

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

Form Definition

getUserValue() public method

public void getUserValue ( $user, $raw true )
$user
$raw
rules() public method

Rules for validating the Field Type Settings Form

public \humhub\modules\user\models\fieldtype\type rules ( )
save() public method

Saves this Profile Field Type

public void save ( )