src/Contao/View/Contao2BackendView/PanelRenderer.php
protected function renderPanelElement($element, $cssClass)
    {
        $environment = $this->getEnvironment();

        $event = new GetPanelElementTemplateEvent($environment, $element);
        $environment->getEventDispatcher()->dispatch($event::NAME, $event);

        $template = $event->getTemplate();

        if (null === $template) {
            return '';
        }

        $template->set('rowClass', $cssClass);
        $element->render($template);

        return $template->parse();
    }
protected function renderPanelElement($element, $cssClass)
    {
        $environment = $this->getEnvironment();

        $event = new GetPanelElementTemplateEvent($environment, $element);
        $environment->getEventDispatcher()->dispatch($event::NAME, $event);

        $template = $event->getTemplate();

        if (null === $template) {
            return '';
        }

        $template->set('rowClass', $cssClass);
        $element->render($template);

        return $template->parse();
    }
protected function renderPanelElement ( $ element , $ cssClass ) { $ environment = $ this -> getEnvironment ( ) ; $ event = new GetPanelElementTemplateEvent ( $ environment , $ element ) ; $ environment -> getEventDispatcher ( ) -> dispatch ( $ event :: NAME , $ event ) ; $ template = $ event -> getTemplate ( ) ; if ( null === $ template ) { return '' ; } $ template -> set ( 'rowClass' , $ cssClass ) ; $ element -> render ( $ template ) ; return $ template -> parse ( ) ; }
Render a single panel element.

@param PanelElementInterface $element  The element to render.
@param string                $cssClass The CSS class to use for this element (even, odd, first, last, ...).

@return string
Render a single panel element .