Свойство | Тип | Описание | |
---|---|---|---|
$_align | string | Set on Form::create() to tell if the type of alignment used (i.e. horizontal). | |
$_templateSet | array | Templates set per alignment type | |
$_templates | array | Default Bootstrap string templates. | |
$_widgets | array | Default Bootstrap widgets. |
Метод | Описание | |
---|---|---|
__construct ( Cake\View\View $View, array $config = [] ) | Construct the widgets and binds the default context providers. | |
create ( mixed $model = null, array $options = [] ) : string | Returns an HTML FORM element. | |
end ( array $secureAttributes = [] ) : string | Closes an HTML form, cleans up values set by FormHelper::create(), and writes hidden input fields where appropriate. | |
input ( string $fieldName, array $options = [] ) : string | Generates a form input element complete with label and wrapper div. | |
staticControl ( string $fieldName, array $options = [] ) : string | Used to place plain text next to label within a form. | |
submit ( string $caption = null, array $options = [] ) : string | Creates a submit button element. |
Метод | Описание | |
---|---|---|
_detectFormAlignment ( array $options ) : string | Detects the form alignment when possible. | |
_formAlignment ( array $options ) : array | Form alignment detector/switcher. | |
_getInput ( string $fieldName, array $options ) : string | Generates an input element. | |
_gridClass ( string $position, boolean $offset = false ) : string | Returns a Bootstrap grid class (i.e. col-md-2). | |
_groupTemplate ( array $options ) : string | Generates an group template element | |
_inputContainerTemplate ( array $options ) : string | Generates an input container template | |
_parseOptions ( string $fieldName, array $options ) : array | Generates input options array |
public __construct ( Cake\View\View $View, array $config = [] ) | ||
$View | Cake\View\View | The View this helper is being attached to. |
$config | array | Configuration settings for the helper. |
protected _detectFormAlignment ( array $options ) : string | ||
$options | array | Options. |
Результат | string | Form alignment type. One of `default`, `horizontal` or `inline`. |
protected _formAlignment ( array $options ) : array | ||
$options | array | Options. |
Результат | array | Modified options. |
protected _groupTemplate ( array $options ) : string | ||
$options | array | The options for group template |
Результат | string | The generated group template |
protected _inputContainerTemplate ( array $options ) : string | ||
$options | array | The options for input container template. |
Результат | string | The generated input container template. |
public create ( mixed $model = null, array $options = [] ) : string | ||
$model | mixed | The context for which the form is being defined. Can be an ORM entity, ORM resultset, or an array of meta data. You can use false or null to make a model-less form. |
$options | array | An array of html attributes and options. |
Результат | string | An formatted opening FORM tag. |
public submit ( string $caption = null, array $options = [] ) : string | ||
$caption | string | The label appearing on the button OR if string contains :// or the extension .jpg, .jpe, .jpeg, .gif, .png use an image if the extension exists, AND the first character is /, image is relative to webroot, OR if the first character is not /, image is relative to webroot/img. |
$options | array | Array of options. See above. |
Результат | string | A HTML submit button |
protected string $_align | ||
Результат | string |
protected array $_templateSet | ||
Результат | array |
protected array $_templates | ||
Результат | array |