protected function appendRangedFormFields(FormBuilderInterface $formBuilder)
    {
        // "From" options
        $fromDefaultOptions = [
            'label'    => 'da2e.filtration.number_filter.ranged.from.label',
            'required' => false,
        ];

        $fromUserOptions = array_key_exists('ranged_from', $this->getFormOptions())
            ? $this->getFormOptions()['ranged_from']
            : [];

        if (count($fromUserOptions) > 0) {
            $fromDefaultOptions = array_merge($fromDefaultOptions, $fromUserOptions);
        }

        $fromDefaultOptions['property_path'] = 'fromValue';

        // "To" options
        $toDefaultOptions = [
            'label'    => 'da2e.filtration.number_filter.ranged.to.label',
            'required' => false,
        ];

        $toUserOptions = array_key_exists('ranged_to', $this->getFormOptions())
            ? $this->getFormOptions()['ranged_to']
            : [];

        if (count($toUserOptions) > 0) {
            $toDefaultOptions = array_merge($toDefaultOptions, $toUserOptions);
        }

        $toDefaultOptions['property_path'] = 'toValue';

        $formBuilder->add($this->getFromValuePropertyName(), $this->getFormFieldTypeRangedFrom(), $fromDefaultOptions);
        $formBuilder->add($this->getToValuePropertyName(), $this->getFormFieldTypeRangedTo(), $toDefaultOptions);

        return $this;
    }
protected function appendRangedFormFields(FormBuilderInterface $formBuilder)
    {
        // "From" options
        $fromDefaultOptions = [
            'label'    => 'da2e.filtration.number_filter.ranged.from.label',
            'required' => false,
        ];

        $fromUserOptions = array_key_exists('ranged_from', $this->getFormOptions())
            ? $this->getFormOptions()['ranged_from']
            : [];

        if (count($fromUserOptions) > 0) {
            $fromDefaultOptions = array_merge($fromDefaultOptions, $fromUserOptions);
        }

        $fromDefaultOptions['property_path'] = 'fromValue';

        // "To" options
        $toDefaultOptions = [
            'label'    => 'da2e.filtration.number_filter.ranged.to.label',
            'required' => false,
        ];

        $toUserOptions = array_key_exists('ranged_to', $this->getFormOptions())
            ? $this->getFormOptions()['ranged_to']
            : [];

        if (count($toUserOptions) > 0) {
            $toDefaultOptions = array_merge($toDefaultOptions, $toUserOptions);
        }

        $toDefaultOptions['property_path'] = 'toValue';

        $formBuilder->add($this->getFromValuePropertyName(), $this->getFormFieldTypeRangedFrom(), $fromDefaultOptions);
        $formBuilder->add($this->getToValuePropertyName(), $this->getFormFieldTypeRangedTo(), $toDefaultOptions);

        return $this;
    }
protected function appendRangedFormFields ( FormBuilderInterface $ formBuilder ) { // "From" options
 $ fromDefaultOptions = [ 'label' => 'da2e.filtration.number_filter.ranged.from.label' , 'required' => false , ] ; $ fromUserOptions = array_key_exists ( 'ranged_from' , $ this -> getFormOptions ( ) ) ? $ this -> getFormOptions ( ) [ 'ranged_from' ] : [ ] ; if ( count ( $ fromUserOptions ) > 0 ) { $ fromDefaultOptions = array_merge ( $ fromDefaultOptions , $ fromUserOptions ) ; } $ fromDefaultOptions [ 'property_path' ] = 'fromValue' ; // "To" options
 $ toDefaultOptions = [ 'label' => 'da2e.filtration.number_filter.ranged.to.label' , 'required' => false , ] ; $ toUserOptions = array_key_exists ( 'ranged_to' , $ this -> getFormOptions ( ) ) ? $ this -> getFormOptions ( ) [ 'ranged_to' ] : [ ] ; if ( count ( $ toUserOptions ) > 0 ) { $ toDefaultOptions = array_merge ( $ toDefaultOptions , $ toUserOptions ) ; } $ toDefaultOptions [ 'property_path' ] = 'toValue' ; $ formBuilder -> add ( $ this -> getFromValuePropertyName ( ) , $ this -> getFormFieldTypeRangedFrom ( ) , $ fromDefaultOptions ) ; $ formBuilder -> add ( $ this -> getToValuePropertyName ( ) , $ this -> getFormFieldTypeRangedTo ( ) , $ toDefaultOptions ) ; return $ this ; }
Appends form fields for "range" mode.

@param FormBuilderInterface $formBuilder

@return static
Appends form fields for range mode .