protected function _monthSelect($options, $context)
    {
        $options += [
            'name' => '',
            'names' => false,
            'val' => null,
            'leadingZeroKey' => true,
            'leadingZeroValue' => false,
            'templateVars' => [],
        ];

        if (empty($options['options'])) {
            if ($options['names'] === true) {
                $options['options'] = $this->_getMonthNames($options['leadingZeroKey']);
            } elseif (is_array($options['names'])) {
                $options['options'] = $options['names'];
            } else {
                $options['options'] = $this->_generateNumbers(1, 12, $options);
            }
        }

        unset($options['leadingZeroKey'], $options['leadingZeroValue'], $options['names']);

        return $this->_select->render($options, $context);
    }
protected function _monthSelect($options, $context)
    {
        $options += [
            'name' => '',
            'names' => false,
            'val' => null,
            'leadingZeroKey' => true,
            'leadingZeroValue' => false,
            'templateVars' => [],
        ];

        if (empty($options['options'])) {
            if ($options['names'] === true) {
                $options['options'] = $this->_getMonthNames($options['leadingZeroKey']);
            } elseif (is_array($options['names'])) {
                $options['options'] = $options['names'];
            } else {
                $options['options'] = $this->_generateNumbers(1, 12, $options);
            }
        }

        unset($options['leadingZeroKey'], $options['leadingZeroValue'], $options['names']);

        return $this->_select->render($options, $context);
    }
protected function _monthSelect ( $ options , $ context ) { $ options += [ 'name' => '' , 'names' => false , 'val' => null , 'leadingZeroKey' => true , 'leadingZeroValue' => false , 'templateVars' => [ ] , ] ; if ( empty ( $ options [ 'options' ] ) ) { if ( $ options [ 'names' ] === true ) { $ options [ 'options' ] = $ this -> _getMonthNames ( $ options [ 'leadingZeroKey' ] ) ; } elseif ( is_array ( $ options [ 'names' ] ) ) { $ options [ 'options' ] = $ options [ 'names' ] ; } else { $ options [ 'options' ] = $ this -> _generateNumbers ( 1 , 12 , $ options ) ; } } unset ( $ options [ 'leadingZeroKey' ] , $ options [ 'leadingZeroValue' ] , $ options [ 'names' ] ) ; return $ this -> _select -> render ( $ options , $ context ) ; }
Generates a month select

@param array $options The options to build the month select with
@param \Cake\View\Form\ContextInterface $context The current form context.
@return string
Generates a month select