Cake\View\Helper\FormHelper::minute PHP Метод

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

### Attributes: - empty - If true, the empty select option is shown. If a string, that string is displayed as the empty element. - value The selected value of the input. - interval The interval that minute options should be created at. - round How you want the value rounded when it does not fit neatly into an interval. Accepts 'up', 'down', and null.
public minute ( string $fieldName, array $options = [] ) : string
$fieldName string Prefix name for the SELECT element
$options array Array of options.
Результат string Completed minute select input.
    public function minute($fieldName, array $options = [])
    {
        $options = $this->_singleDatetime($options, 'minute');
        if (isset($options['val']) && $options['val'] > 0 && $options['val'] <= 60) {
            $options['val'] = ['hour' => date('H'), 'minute' => (int) $options['val']];
        }
        return $this->dateTime($fieldName, $options);
    }

Usage Example

 public function minute($fieldName, array $options = [])
 {
     $options = $this->_injectStyles($options, 'form-control');
     return parent::minute($fieldName, $options);
 }