Blesta Source Documentation

InputField extends AbstractField

Input Field

Stores information regarding a particular Input Field, which may consist of a label, tooltip, input field, or some combination thereof.

Table of Contents

Properties

$fields
$params
$type

Methods

__construct() Constructs a new AbstractField of the given type. Types directly correlate to Form helper method names.
attach() Attaches a field to a label FieldInterface, or a tooltip to a label FieldInterface.
setLabel() Sets the label associated with this specific field.
setParam() Sets all parameters for this InputField, which will be dispatched to the appropriate Form helper method when needed, or to the tooltip.
Properties

$fields

public array<string|int, mixed> $fields = []

All fields or tooltips attached to this label

$params

public array<string|int, mixed> $params = []

All parameters set for this InputField

Methods

__construct()

Constructs a new AbstractField of the given type. Types directly correlate to Form helper method names.

public __construct(string $type) : mixed
Parameters
$type : string

The type of FieldInterface

attach()

Attaches a field to a label FieldInterface, or a tooltip to a label FieldInterface.

public attach(FieldInterface $field) : InputField

Only field and tooltip types can be attached to a label. So the current object must be of type "label". And $field must be of some other type.

Parameters
$field : FieldInterface

The FieldInterface to attach to this label

Return values
InputField

setParam()

Sets all parameters for this InputField, which will be dispatched to the appropriate Form helper method when needed, or to the tooltip.

public setParam(string $name, mixed $value) : InputField
Parameters
$name : string

The name of the parameter. For tooltip types this should be 'message'

$value : mixed

The value of the parameter

Return values
InputField
Tags
subpackage

core.Util.Input.Fields

copyright

Copyright (c) 2020, Phillips Data, Inc.

license

http://www.blesta.com/license/ The Blesta License Agreement

link

Blesta

see
InputFields

        
On this page

Search results