library/Garp/Form.php
protected function _getDefaultDecoratorOptions($type, array $options = []): array {
        // Set default required label suffix
        $labelOptions = [];
        if ($this->_defaultRequiredLabelSuffix) {
            $labelOptions['requiredSuffix'] = $this->getDefaultRequiredLabelSuffix();
            // labeloptions should never be escaped because of required suffix (<i>*</i>)
            $labelOptions['escape'] = false;
        }
        $decorators = [
            'ViewHelper',
            ['Label', $labelOptions],
            'Description',
            'Errors'
        ];

        if ($type != 'hidden') {
            $divWrapperOptions = ['tag' => 'div'];
            if (isset($options['parentClass'])) {
                $divWrapperOptions['class'] = $options['parentClass'];
            }
            $decorators[] = ['HtmlTag', $divWrapperOptions];
        }
        return $decorators;
    }
protected function _getDefaultDecoratorOptions($type, array $options = []): array {
        // Set default required label suffix
        $labelOptions = [];
        if ($this->_defaultRequiredLabelSuffix) {
            $labelOptions['requiredSuffix'] = $this->getDefaultRequiredLabelSuffix();
            // labeloptions should never be escaped because of required suffix (<i>*</i>)
            $labelOptions['escape'] = false;
        }
        $decorators = [
            'ViewHelper',
            ['Label', $labelOptions],
            'Description',
            'Errors'
        ];

        if ($type != 'hidden') {
            $divWrapperOptions = ['tag' => 'div'];
            if (isset($options['parentClass'])) {
                $divWrapperOptions['class'] = $options['parentClass'];
            }
            $decorators[] = ['HtmlTag', $divWrapperOptions];
        }
        return $decorators;
    }
protected function _getDefaultDecoratorOptions ( $ type , array $ options = [ ] ) : array { // Set default required label suffix $ labelOptions = [ ] ; if ( $ this -> _defaultRequiredLabelSuffix ) { $ labelOptions [ 'requiredSuffix' ] = $ this -> getDefaultRequiredLabelSuffix ( ) ; // labeloptions should never be escaped because of required suffix (<i>*</i>) $ labelOptions [ 'escape' ] = false ; } $ decorators = [ 'ViewHelper' , [ 'Label' , $ labelOptions ] , 'Description' , 'Errors' ] ; if ( $ type != 'hidden' ) { $ divWrapperOptions = [ 'tag' => 'div' ] ; if ( isset ( $ options [ 'parentClass' ] ) ) { $ divWrapperOptions [ 'class' ] = $ options [ 'parentClass' ] ; } $ decorators [ ] = [ 'HtmlTag' , $ divWrapperOptions ] ; } return $ decorators ; }
Retrieve default decorators

@param  string $type Type of element
@param  array  $options Options given with the element
@return void
Retrieve default decorators