$_select
$_select : \Cake\View\Widget\SelectBoxWidget
Select box widget.
Input widget class for generating a date time input widget.
This class is intended as an internal implementation detail of Cake\View\Helper\FormHelper and is not intended for direct use.
$_select : \Cake\View\Widget\SelectBoxWidget
Select box widget.
$_templates : \Cake\View\StringTemplate
Template instance.
__construct(\Cake\View\StringTemplate $templates, \Cake\View\Widget\SelectBoxWidget $selectBox)
Constructor
| \Cake\View\StringTemplate | $templates | Templates list. |
| \Cake\View\Widget\SelectBoxWidget | $selectBox | Selectbox widget instance. |
render(array $data, \Cake\View\Form\ContextInterface $context) : string
Renders a date time widget
name - Set the input name.disabled - Either true or an array of options to disable.val - A date time string, integer or DateTime objectempty - Set to true to add an empty option at the top of the
option elements. Set to a string to define the display value of the
empty option.In addition to the above options, the following options allow you to control which input elements are generated. By setting any option to false you can disable that input picker. In addition each picker allows you to set additional options that are set as HTML properties on the picker.
year - Array of options for the year select box.month - Array of options for the month select box.day - Array of options for the day select box.hour - Array of options for the hour select box.minute - Array of options for the minute select box.second - Set to true to enable the seconds input. Defaults to false.meridian - Set to true to enable the meridian input. Defaults to false.
The meridian will be enabled automatically if you choose a 12 hour format.The year option accepts the start and end options. These let you control
the year range that is generated. It defaults to +-5 years from today.
The month option accepts the name option which allows you to get month
names instead of month numbers.
The hour option allows you to set the following options:
format option which accepts 12 or 24, allowing
you to indicate which hour format you want.start The hour to start the options at.end The hour to stop the options at.The start and end options are dependent on the format used. If the value is out of the start/end range it will not be included.
The minute option allows you to define the following options:
interval The interval to round options to.round Accepts up or down. Defines which direction the current value
should be rounded to match the select options.| array | $data | Data to render with. |
| \Cake\View\Form\ContextInterface | $context | The current form context. |
When option data is invalid.
A generated select box.
_yearSelect(array $options, \Cake\View\Form\ContextInterface $context) : string
Generates a year select
| array | $options | Options list. |
| \Cake\View\Form\ContextInterface | $context | The current form context. |
_monthSelect(array $options, \Cake\View\Form\ContextInterface $context) : string
Generates a month select
| array | $options | The options to build the month select with |
| \Cake\View\Form\ContextInterface | $context | The current form context. |
_daySelect(array $options, \Cake\View\Form\ContextInterface $context) : string
Generates a day select
| array | $options | The options to generate a day select with. |
| \Cake\View\Form\ContextInterface | $context | The current form context. |
_hourSelect(array $options, \Cake\View\Form\ContextInterface $context) : string
Generates a hour select
| array | $options | The options to generate an hour select with |
| \Cake\View\Form\ContextInterface | $context | The current form context. |
_minuteSelect(array $options, \Cake\View\Form\ContextInterface $context) : string
Generates a minute select
| array | $options | The options to generate a minute select with. |
| \Cake\View\Form\ContextInterface | $context | The current form context. |
_secondSelect(array $options, \Cake\View\Form\ContextInterface $context) : string
Generates a second select
| array | $options | The options to generate a second select with |
| \Cake\View\Form\ContextInterface | $context | The current form context. |
_meridianSelect(array $options, \Cake\View\Form\ContextInterface $context) : string
Generates a meridian select
| array | $options | The options to generate a meridian select with. |
| \Cake\View\Form\ContextInterface | $context | The current form context. |
_generateNumbers(integer $start, integer $end, array $options = array()) : array
Generates a range of numbers
| integer | $start | Start of the range of numbers to generate |
| integer | $end | End of the range of numbers to generate |
| array | $options | Options list. |