- Phalcon\Forms\Element\AbstractElement
- Phalcon\Forms\Element\Check
- Phalcon\Forms\Element\Date
- Phalcon\Forms\Element\ElementInterface
- Phalcon\Forms\Element\Email
- Phalcon\Forms\Element\File
- Phalcon\Forms\Element\Hidden
- Phalcon\Forms\Element\Numeric
- Phalcon\Forms\Element\Password
- Phalcon\Forms\Element\Radio
- Phalcon\Forms\Element\Select
- Phalcon\Forms\Element\Submit
- Phalcon\Forms\Element\Text
- Phalcon\Forms\Element\TextArea
- Phalcon\Forms\Exception
- Phalcon\Forms\Form
- Phalcon\Forms\Manager
Abstract Class Phalcon\Forms\Element\AbstractElement
| Namespace | Phalcon\Forms\Element | | Uses | InvalidArgumentException, Phalcon\Forms\Form, Phalcon\Forms\Exception, Phalcon\Messages\MessageInterface, Phalcon\Messages\Messages, Phalcon\Tag, Phalcon\Validation\ValidatorInterface | | Implements | ElementInterface |
This is a base class for form elements
Properties¶
//
protected attributes;
//
protected filters;
//
protected form;
//
protected label;
//
protected messages;
//
protected name;
//
protected options;
/**
* @var array
*/
protected validators;
//
protected value;
Methods¶
Phalcon\Forms\Element constructor Magic method __toString renders the widget without attributes Adds a filter to current list of filters Adds a validator to the element Adds a group of validators Appends a message to the internal message list Clears element to its default value Returns the value of an attribute if present Returns the default attributes for the element Returns the default value assigned to the element Returns the element filters Returns the parent form to the element Returns the element label Returns the messages that belongs to the element The element needs to be attached to a form Returns the element name Returns the value of an option if present Returns the options for the element Returns the validators registered for the element Returns the element's value Checks whether there are messages attached to the element Generate the HTML to label the element Returns an array of prepared attributes for Phalcon\Tag helpers according to the element parameters Sets a default attribute for the element Sets default attributes for the element Sets a default value in case the form does not use an entity or there is no value available for the element in _POST Sets the element filters Sets the parent form to the element Sets the element label Sets the validation messages related to the element Sets the element name Sets an option for the element Sets options for the elementClass Phalcon\Forms\Element\Check
| Namespace | Phalcon\Forms\Element | | Uses | Phalcon\Tag | | Extends | AbstractElement |
Phalcon\Forms\Element\Check
Component INPUT[type=check] for forms
Methods¶
Renders the element widget returning HTMLClass Phalcon\Forms\Element\Date
| Namespace | Phalcon\Forms\Element | | Uses | Phalcon\Tag | | Extends | AbstractElement |
Component INPUT[type=date] for forms
Methods¶
Renders the element widget returning htmlInterface Phalcon\Forms\Element\ElementInterface
| Namespace | Phalcon\Forms\Element | | Uses | Phalcon\Forms\Form, Phalcon\Messages\MessageInterface, Phalcon\Messages\Messages, Phalcon\Validation\ValidatorInterface |
Interface for Phalcon\Forms\Element classes
Methods¶
Adds a filter to current list of filters Adds a validator to the element Adds a group of validators Appends a message to the internal message list Clears every element in the form to its default value Returns the value of an attribute if present Returns the default attributes for the element Returns the default value assigned to the element Returns the element's filters Returns the parent form to the element Returns the element's label Returns the messages that belongs to the element The element needs to be attached to a form Returns the element's name Returns the value of an option if present Returns the options for the element Returns the validators registered for the element Returns the element's value Checks whether there are messages attached to the element Generate the HTML to label the element Returns an array of prepared attributes for Phalcon\Tag helpers according to the element's parameters Renders the element widget Sets a default attribute for the element Sets default attributes for the element Sets a default value in case the form does not use an entity or there is no value available for the element in _POST Sets the element's filters Sets the parent form to the element Sets the element label Sets the validation messages related to the element Sets the element's name Sets an option for the element Sets options for the elementClass Phalcon\Forms\Element\Email
| Namespace | Phalcon\Forms\Element | | Uses | Phalcon\Tag | | Extends | AbstractElement |
Phalcon\Forms\Element\Email
Component INPUT[type=email] for forms
Methods¶
Renders the element widget returning HTMLClass Phalcon\Forms\Element\File
| Namespace | Phalcon\Forms\Element | | Uses | Phalcon\Tag | | Extends | AbstractElement |
Component INPUT[type=file] for forms
Methods¶
Renders the element widget returning HTMLClass Phalcon\Forms\Element\Hidden
| Namespace | Phalcon\Forms\Element | | Uses | Phalcon\Tag | | Extends | AbstractElement |
Phalcon\Forms\Element\Hidden
Component INPUT[type=hidden] for forms
Methods¶
Renders the element widget returning HTMLClass Phalcon\Forms\Element\Numeric
| Namespace | Phalcon\Forms\Element | | Uses | Phalcon\Tag | | Extends | AbstractElement |
Phalcon\Forms\Element\Numeric
Component INPUT[type=number] for forms
Methods¶
Renders the element widget returning HTMLClass Phalcon\Forms\Element\Password
| Namespace | Phalcon\Forms\Element | | Uses | Phalcon\Tag | | Extends | AbstractElement |
Phalcon\Forms\Element\Password
Component INPUT[type=password] for forms
Methods¶
Renders the element widget returning HTMLClass Phalcon\Forms\Element\Radio
| Namespace | Phalcon\Forms\Element | | Uses | Phalcon\Tag | | Extends | AbstractElement |
Phalcon\Forms\Element\Radio
Component INPUT[type=radio] for forms
Methods¶
Renders the element widget returning HTMLClass Phalcon\Forms\Element\Select
| Namespace | Phalcon\Forms\Element | | Uses | Phalcon\Tag\Select | | Extends | AbstractElement |
Phalcon\Forms\Element\Select
Component SELECT (choice) for forms
Properties¶
Methods¶
Phalcon\Forms\Element constructor Adds an option to the current options Returns the choices' options Renders the element widget returning HTML Set the choice's optionsClass Phalcon\Forms\Element\Submit
| Namespace | Phalcon\Forms\Element | | Uses | Phalcon\Tag | | Extends | AbstractElement |
Component INPUT[type=submit] for forms
Methods¶
Renders the element widgetClass Phalcon\Forms\Element\Text
| Namespace | Phalcon\Forms\Element | | Uses | Phalcon\Tag | | Extends | AbstractElement |
Phalcon\Forms\Element\Text
Component INPUT[type=text] for forms
Methods¶
Renders the element widgetClass Phalcon\Forms\Element\TextArea
| Namespace | Phalcon\Forms\Element | | Uses | Phalcon\Tag | | Extends | AbstractElement |
Component TEXTAREA for forms
Methods¶
Renders the element widgetClass Phalcon\Forms\Exception
| Namespace | Phalcon\Forms | | Extends | \Phalcon\Exception |
Exceptions thrown in Phalcon\Forms will use this class
Class Phalcon\Forms\Form
| Namespace | Phalcon\Forms | | Uses | Countable, Iterator, Phalcon\Di\Injectable, Phalcon\Di\DiInterface, Phalcon\Filter\FilterInterface, Phalcon\Forms\Element\ElementInterface, Phalcon\Html\Attributes, Phalcon\Html\Attributes\AttributesInterface, Phalcon\Messages\Messages, Phalcon\Tag, Phalcon\Validation, Phalcon\Validation\ValidationInterface | | Extends | Injectable | | Implements | Countable, Iterator, AttributesInterface |
This component allows to build forms using an object-oriented interface
Properties¶
/**
* @var Attributes | null
*/
protected attributes;
//
protected data;
//
protected elements;
//
protected elementsIndexed;
//
protected entity;
//
protected messages;
//
protected position;
//
protected options;
//
protected validation;
Methods¶
Phalcon\Forms\Form constructor Adds an element to the form Binds data to the entity Clears every element in the form to its default value Returns the number of elements in the form Returns the current element in the iterator Returns an element added to the form by its name Returns the form's action Get Form attributes collection Returns the form elements added to the form Returns the entity related to the model Returns a label for an element Returns the messages generated in the validation.if ($form->isValid($_POST) == false) {
$messages = $form->getMessages();
foreach ($messages as $message) {
echo $message, "<br>";
}
}
Class Phalcon\Forms\Manager
| Namespace | Phalcon\Forms |
Forms Manager