protected function appendSingleFormFields(FormBuilderInterface $formBuilder)
    {
        $defaultOptions = [
            'label'    => $this->getTitle(),
            'required' => false,
        ];

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

        if (count($userOptions) > 0) {
            $defaultOptions = array_merge($defaultOptions, $userOptions);
        }

        $defaultOptions['property_path'] = 'value';

        $formBuilder->add($this->getValuePropertyName(), $this->getFormFieldType(), $defaultOptions);

        return $this;
    }
protected function appendSingleFormFields(FormBuilderInterface $formBuilder)
    {
        $defaultOptions = [
            'label'    => $this->getTitle(),
            'required' => false,
        ];

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

        if (count($userOptions) > 0) {
            $defaultOptions = array_merge($defaultOptions, $userOptions);
        }

        $defaultOptions['property_path'] = 'value';

        $formBuilder->add($this->getValuePropertyName(), $this->getFormFieldType(), $defaultOptions);

        return $this;
    }
protected function appendSingleFormFields ( FormBuilderInterface $ formBuilder ) { $ defaultOptions = [ 'label' => $ this -> getTitle ( ) , 'required' => false , ] ; $ userOptions = array_key_exists ( 'single' , $ this -> getFormOptions ( ) ) ? $ this -> getFormOptions ( ) [ 'single' ] : [ ] ; if ( count ( $ userOptions ) > 0 ) { $ defaultOptions = array_merge ( $ defaultOptions , $ userOptions ) ; } $ defaultOptions [ 'property_path' ] = 'value' ; $ formBuilder -> add ( $ this -> getValuePropertyName ( ) , $ this -> getFormFieldType ( ) , $ defaultOptions ) ; return $ this ; }
Appends form fields for "single" mode.

@param FormBuilderInterface $formBuilder

@return static
Appends form fields for single mode .