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 '';
    }