public function render(ElementInterface $formElement, $value = '', $attributes = array())
    {
        $this->checkDependencies();

        $config = $this->di->get('config');

        if (empty($this->templateName) && !empty($config->forms->templates->default_name)) {
            $this->templateName = $config->forms->templates->default_name;
        }

        $this->variables['element'] = $formElement;
        $this->variables['value'] = $value;
        $this->variables['attributes'] = $attributes;

        $partial = $this->generatePartial();

        return $partial;
    }
public function render(ElementInterface $formElement, $value = '', $attributes = array())
    {
        $this->checkDependencies();

        $config = $this->di->get('config');

        if (empty($this->templateName) && !empty($config->forms->templates->default_name)) {
            $this->templateName = $config->forms->templates->default_name;
        }

        $this->variables['element'] = $formElement;
        $this->variables['value'] = $value;
        $this->variables['attributes'] = $attributes;

        $partial = $this->generatePartial();

        return $partial;
    }
public function render ( ElementInterface $ formElement , $ value = '' , $ attributes = array ( ) ) { $ this -> checkDependencies ( ) ; $ config = $ this -> di -> get ( 'config' ) ; if ( empty ( $ this -> templateName ) && ! empty ( $ config -> forms -> templates -> default_name ) ) { $ this -> templateName = $ config -> forms -> templates -> default_name ; } $ this -> variables [ 'element' ] = $ formElement ; $ this -> variables [ 'value' ] = $ value ; $ this -> variables [ 'attributes' ] = $ attributes ; $ partial = $ this -> generatePartial ( ) ; return $ partial ; }
Render form element with current templatePath and templateName.
If templatePath or templateName are not set, render default.

@param ElementInterface $formElement
@param string $value
@param array $attributes
@return string
@throws Decorator\Exception\DiNotSetException
@throws Decorator\Exception\InvalidAssetsManagerException
@throws Decorator\Exception\ViewNotSetException
Render form element with current templatePath and templateName . If templatePath or templateName are not set render default .