/** * Renders the label of the given view * * @param BlockView $view The view for which to render the label * @param string $label The label * @param array $variables Additional variables passed to the template * * @return string */ public function label(BlockView $view, $label = null, array $variables = []) { if (null !== $label) { $variables += ['label' => $label]; } return $this->renderer->searchAndRenderBlock($view, 'label', $variables); }
/** * Renders views which have not already been rendered. * * @param FormView $view The parent view * @param array $variables An array of variables * * @return string The HTML markup */ public function rest(FormView $view, array $variables = array()) { return $this->renderer->searchAndRenderBlock($view, 'rest', $variables); }
/** * Renders the HTML enctype in the form tag, if necessary. * * Example usage in Smarty templates: * * <form action="..." method="post" {form_enctype form=$form}> * * @param array $params Attributes passed from the template. * @param object $template The \Smarty_Internal_Template instance. * * @return string The HTML markup */ public function renderEnctype($params, \Smarty_Internal_Template $template) { list($view, $parameters) = $this->extractFunctionParameters($params); return $this->renderer->searchAndRenderBlock($view, 'enctype'); }
/** * Render Function Form Javascript * * @param FormView $view * @param bool $prototype * * @return string */ public function renderJavascript(FormView $view, $prototype = false) { $block = $prototype ? 'javascript_prototype' : 'javascript'; return $this->renderer->searchAndRenderBlock($view, $block); }
/** * Render Function Form Stylesheet * @param FormView $view * * @return string */ public function renderStylesheet(FormView $view) { return $this->renderer->searchAndRenderBlock($view, 'afe_stylesheet'); }
/** * {@inheritdoc} */ public function renderBlock(BlockView $view) { return $this->innerRenderer->searchAndRenderBlock($view, 'widget'); }