Class humhub\modules\user\models\fieldtype\Select

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

ProfileFieldTypeSelect handles numeric 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\Select
getFieldRules() Returns the Field Rules, to validate users input humhub\modules\user\models\fieldtype\Select
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\Select
getLabels() Return array of Labels for Field humhub\modules\user\models\fieldtype\BaseType
getSelectItems() Returns a list of possible options humhub\modules\user\models\fieldtype\Select
getTypeInstances() Returns an array of instances of all available field types. humhub\modules\user\models\fieldtype\BaseType
getUserValue() Returns value of option humhub\modules\user\models\fieldtype\Select
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\Select
save() Saves this Profile Field Type humhub\modules\user\models\fieldtype\Select
setProfileField() Links a ProfileField to the ProfileFieldType. humhub\modules\user\models\fieldtype\BaseType
validate() Validates a ProfileFieldType humhub\modules\user\models\fieldtype\BaseType

Property Details

$options public property
public String $options null

Method Details

getFieldFormDefinition() public method

Return the Form Element to edit the value of the Field

public void getFieldFormDefinition ( )
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
return Array

Form Definition

getSelectItems() public method

Returns a list of possible options

public Array getSelectItems ( )
getUserValue() public method

Returns value of option

public String getUserValue ( $user, $raw true )
$user \humhub\modules\user\models\fieldtype\User
$raw Boolean

Output Key

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 ( )