Ejemplo n.º 1
0
 /**
  * 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);
 }
Ejemplo n.º 2
0
 /**
  * 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);
 }
Ejemplo n.º 3
0
 /**
  * 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');
 }
Ejemplo n.º 4
0
 /**
  * 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');
 }
Ejemplo n.º 6
0
 /**
  * {@inheritdoc}
  */
 public function renderBlock(BlockView $view)
 {
     return $this->innerRenderer->searchAndRenderBlock($view, 'widget');
 }