library/Garp/Form.php
protected function _mergeDecorators(Zend_Form_Element $element, array $inheritance) {
        if (empty($inheritance)) {
            return;
        }

        $element->setDecorators(
            f\reduce(
                function ($decorators, $mergeSpec) {
                    if (!isset($mergeSpec['at']) && !isset($mergeSpec['after'])) {
                        return f\concat($decorators, [$mergeSpec]);
                    }
                    if (!isset($mergeSpec['spec'])) {
                        throw new InvalidArgumentException(
                            'key "spec" is required to describe decorator'
                        );
                    }
                    $mergeCallback = $this->_getDecoratorMergeCallback(
                        $mergeSpec['at'] ?? $mergeSpec['after']
                    );
                    $mergeFn = isset($mergeSpec['at']) ?
                        f\merge_at($mergeSpec['spec'], $mergeCallback) :
                        f\merge_after($mergeSpec['spec'], $mergeCallback);
                    return $mergeFn($decorators);
                },
                $element->getDecorators(),
                $inheritance
            )
        );
    }
protected function _mergeDecorators(Zend_Form_Element $element, array $inheritance) {
        if (empty($inheritance)) {
            return;
        }

        $element->setDecorators(
            f\reduce(
                function ($decorators, $mergeSpec) {
                    if (!isset($mergeSpec['at']) && !isset($mergeSpec['after'])) {
                        return f\concat($decorators, [$mergeSpec]);
                    }
                    if (!isset($mergeSpec['spec'])) {
                        throw new InvalidArgumentException(
                            'key "spec" is required to describe decorator'
                        );
                    }
                    $mergeCallback = $this->_getDecoratorMergeCallback(
                        $mergeSpec['at'] ?? $mergeSpec['after']
                    );
                    $mergeFn = isset($mergeSpec['at']) ?
                        f\merge_at($mergeSpec['spec'], $mergeCallback) :
                        f\merge_after($mergeSpec['spec'], $mergeCallback);
                    return $mergeFn($decorators);
                },
                $element->getDecorators(),
                $inheritance
            )
        );
    }
protected function _mergeDecorators ( Zend_Form_Element $ element , array $ inheritance ) { if ( empty ( $ inheritance ) ) { return ; } $ element -> setDecorators ( f \ reduce ( function ( $ decorators , $ mergeSpec ) { if ( ! isset ( $ mergeSpec [ 'at' ] ) && ! isset ( $ mergeSpec [ 'after' ] ) ) { return f \ concat ( $ decorators , [ $ mergeSpec ] ) ; } if ( ! isset ( $ mergeSpec [ 'spec' ] ) ) { throw new InvalidArgumentException ( 'key "spec" is required to describe decorator' ) ; } $ mergeCallback = $ this -> _getDecoratorMergeCallback ( $ mergeSpec [ 'at' ] ?? $ mergeSpec [ 'after' ] ) ; $ mergeFn = isset ( $ mergeSpec [ 'at' ] ) ? f \ merge_at ( $ mergeSpec [ 'spec' ] , $ mergeCallback ) : f \ merge_after ( $ mergeSpec [ 'spec' ] , $ mergeCallback ) ; return $ mergeFn ( $ decorators ) ; } , $ element -> getDecorators ( ) , $ inheritance ) ) ; }
Merge a new decorator into the list of default decorators.
Control placement with 'at' or 'after' flags.

@param  Zend_Form_Element $element
@param  array $inheritance
@return void
Merge a new decorator into the list of default decorators . Control placement with at or after flags .