src/Contao/View/Contao2BackendView/PanelRenderer.php
public function render($ignoredPanels = [])
    {
        $environment = $this->getEnvironment();

        // If in edit/override all mode and list all properties, the panel filter isn´t in use.
        if ('properties' === $environment->getInputProvider()->getParameter('select')) {
            return '';
        }

        if (null === $this->view->getPanel()) {
            throw new DcGeneralRuntimeException('No panel information stored in data container.');
        }

        $panels = [];
        foreach ($this->view->getPanel() as $panel) {
            $panels[] = $this->renderPanelRow($panel, $ignoredPanels);
        }

        if (\count($panels)) {
            $template   = new ContaoBackendViewTemplate('dcbe_general_panel');
            $themeEvent = new GetThemeEvent();

            $environment->getEventDispatcher()->dispatch(ContaoEvents::BACKEND_GET_THEME, $themeEvent);

            $template
                ->set('action', \ampersand($environment->getInputProvider()->getRequestUrl(), true))
                ->set('theme', $themeEvent->getTheme())
                ->set('panel', $panels);

            return $template->parse();
        }

        return '';
    }
public function render($ignoredPanels = [])
    {
        $environment = $this->getEnvironment();

        // If in edit/override all mode and list all properties, the panel filter isn´t in use.
        if ('properties' === $environment->getInputProvider()->getParameter('select')) {
            return '';
        }

        if (null === $this->view->getPanel()) {
            throw new DcGeneralRuntimeException('No panel information stored in data container.');
        }

        $panels = [];
        foreach ($this->view->getPanel() as $panel) {
            $panels[] = $this->renderPanelRow($panel, $ignoredPanels);
        }

        if (\count($panels)) {
            $template   = new ContaoBackendViewTemplate('dcbe_general_panel');
            $themeEvent = new GetThemeEvent();

            $environment->getEventDispatcher()->dispatch(ContaoEvents::BACKEND_GET_THEME, $themeEvent);

            $template
                ->set('action', \ampersand($environment->getInputProvider()->getRequestUrl(), true))
                ->set('theme', $themeEvent->getTheme())
                ->set('panel', $panels);

            return $template->parse();
        }

        return '';
    }
public function render ( $ ignoredPanels = [ ] ) { $ environment = $ this -> getEnvironment ( ) ; // If in edit/override all mode and list all properties, the panel filter isn´t in use. if ( 'properties' === $ environment -> getInputProvider ( ) -> getParameter ( 'select' ) ) { return '' ; } if ( null === $ this -> view -> getPanel ( ) ) { throw new DcGeneralRuntimeException ( 'No panel information stored in data container.' ) ; } $ panels = [ ] ; foreach ( $ this -> view -> getPanel ( ) as $ panel ) { $ panels [ ] = $ this -> renderPanelRow ( $ panel , $ ignoredPanels ) ; } if ( \ count ( $ panels ) ) { $ template = new ContaoBackendViewTemplate ( 'dcbe_general_panel' ) ; $ themeEvent = new GetThemeEvent ( ) ; $ environment -> getEventDispatcher ( ) -> dispatch ( ContaoEvents :: BACKEND_GET_THEME , $ themeEvent ) ; $ template -> set ( 'action' , \ ampersand ( $ environment -> getInputProvider ( ) -> getRequestUrl ( ) , true ) ) -> set ( 'theme' , $ themeEvent -> getTheme ( ) ) -> set ( 'panel' , $ panels ) ; return $ template -> parse ( ) ; } return '' ; }
Render the panels.

@param array $ignoredPanels A list with ignored elements [Optional].

@throws DcGeneralRuntimeException When no information of panels can be obtained from the data container.

@return string
Render the panels .