public function transform($value)
    {
        /* @var \Twig_Template $template */
        $template = $this->twig->loadTemplate($this->resource);
        $variables = array_replace($this->variables, ['data' => $value]);

        if (null !== $this->blockname) {
            $value = $template->renderBlock($this->blockname, $variables);
        } else {
            $value = $template->render($variables);
        }

        return $value;
    }
public function transform($value)
    {
        /* @var \Twig_Template $template */
        $template = $this->twig->loadTemplate($this->resource);
        $variables = array_replace($this->variables, ['data' => $value]);

        if (null !== $this->blockname) {
            $value = $template->renderBlock($this->blockname, $variables);
        } else {
            $value = $template->render($variables);
        }

        return $value;
    }
public function transform ( $ value ) { /* @var \Twig_Template $template */ $ template = $ this -> twig -> loadTemplate ( $ this -> resource ) ; $ variables = array_replace ( $ this -> variables , [ 'data' => $ value ] ) ; if ( null !== $ this -> blockname ) { $ value = $ template -> renderBlock ( $ this -> blockname , $ variables ) ; } else { $ value = $ template -> render ( $ variables ) ; } return $ value ; }
Transforms a twig template to html string.

@param mixed $value The value

@return string The html string
Transforms a twig template to html string .