protected function encodeSimpleControl($name, AbstractControl $control, Encoder $encoder, $flags = null)
    {
        $buffer = sprintf(
            '%s = L.%s(%s)%s',
            $encoder->encodeReference($control),
            $name,
            $encoder->encodeValue($control->getOptions()),
            $encoder->close($flags)
        );

        $buffer .= $this->encodeMethodCalls($control->getMethodCalls(), $encoder, $flags);

        return $buffer;
    }
protected function encodeSimpleControl($name, AbstractControl $control, Encoder $encoder, $flags = null)
    {
        $buffer = sprintf(
            '%s = L.%s(%s)%s',
            $encoder->encodeReference($control),
            $name,
            $encoder->encodeValue($control->getOptions()),
            $encoder->close($flags)
        );

        $buffer .= $this->encodeMethodCalls($control->getMethodCalls(), $encoder, $flags);

        return $buffer;
    }
protected function encodeSimpleControl ( $ name , AbstractControl $ control , Encoder $ encoder , $ flags = null ) { $ buffer = sprintf ( '%s = L.%s(%s)%s' , $ encoder -> encodeReference ( $ control ) , $ name , $ encoder -> encodeValue ( $ control -> getOptions ( ) ) , $ encoder -> close ( $ flags ) ) ; $ buffer .= $ this -> encodeMethodCalls ( $ control -> getMethodCalls ( ) , $ encoder , $ flags ) ; return $ buffer ; }
Encode an control.

@param string          $name    Control name.
@param AbstractControl $control The control object.
@param Encoder         $encoder Javascript encoder.
@param null            $flags   Encoder flags.

@return string
Encode an control .