PHP Интерфейс FOF30\Form\FieldInterface

Показать файл Открыть проект

Открытые методы

Метод Описание
getAttribute ( string $name, mixed $default = null ) : mixed Method to get an attribute of the field
getRepeatable ( ) : string Get the rendering of this field type for a repeatable (grid) display, e.g. in a view listing many item (typically a "browse" task)
getStatic ( ) : string Get the rendering of this field type for static display, e.g. in a single item view (typically a "read" task).
renderField ( array $options = [] ) : string Method to get a control group with label and input.
setForm ( JForm $form ) : FOF30\Form\FieldInterface Method to attach a JForm object to the field. Actually, we need a FOF Form object but there's no way to provide that type hint without issuing a string standards notice in PHP :(
setValue ( mixed $value ) : void Simple method to set the value
setup ( SimpleXMLElement $element, mixed $value, string $group = null ) : boolean Method to attach a Form object to the field.

Описание методов

getAttribute() публичный Метод

Method to get an attribute of the field
public getAttribute ( string $name, mixed $default = null ) : mixed
$name string Name of the attribute to get
$default mixed Optional value to return if attribute not found
Результат mixed Value of the attribute / default

getRepeatable() публичный Метод

Get the rendering of this field type for a repeatable (grid) display, e.g. in a view listing many item (typically a "browse" task)
С версии: 2.0
public getRepeatable ( ) : string
Результат string The field HTML

getStatic() публичный Метод

Get the rendering of this field type for static display, e.g. in a single item view (typically a "read" task).
С версии: 2.0
public getStatic ( ) : string
Результат string The field HTML

renderField() публичный Метод

Method to get a control group with label and input.
public renderField ( array $options = [] ) : string
$options array Options to be passed into the rendering of the field
Результат string A string containing the html for the control group

setForm() публичный Метод

Method to attach a JForm object to the field. Actually, we need a FOF Form object but there's no way to provide that type hint without issuing a string standards notice in PHP :(
public setForm ( JForm $form ) : FOF30\Form\FieldInterface
$form JForm The JForm object to attach to the form field.
Результат FOF30\Form\FieldInterface The form field object so that the method can be used in a chain.

setValue() публичный Метод

Simple method to set the value
public setValue ( mixed $value ) : void
$value mixed Value to set
Результат void

setup() публичный Метод

Method to attach a Form object to the field.
public setup ( SimpleXMLElement $element, mixed $value, string $group = null ) : boolean
$element SimpleXMLElement The SimpleXMLElement object representing the tag for the form field object.
$value mixed The form field value to validate.
$group string The field name group control value. This acts as as an array container for the field. For example if the field has name="foo" and the group value is set to "bar" then the full field name would end up being "bar[foo]".
Результат boolean True on success.