src/Contao/Event/Subscriber.php
public function getPanelElementTemplate(GetPanelElementTemplateEvent $event)
    {
        if (!$this->scopeDeterminator->currentScopeIsBackend()) {
            return;
        }

        if ($event->getTemplate()) {
            return;
        }

        $element = $event->getElement();

        if ($element instanceof FilterElementInterface) {
            $event->setTemplate(new ContaoBackendViewTemplate('dcbe_general_panel_filter'));
        } elseif ($element instanceof LimitElementInterface) {
            $event->setTemplate(new ContaoBackendViewTemplate('dcbe_general_panel_limit'));
        } elseif ($element instanceof SearchElementInterface) {
            $event->setTemplate(new ContaoBackendViewTemplate('dcbe_general_panel_search'));
        } elseif ($element instanceof SortElementInterface) {
            $event->setTemplate(new ContaoBackendViewTemplate('dcbe_general_panel_sort'));
        } elseif ($element instanceof SubmitElementInterface) {
            $event->setTemplate(new ContaoBackendViewTemplate('dcbe_general_panel_submit'));
        }
    }
public function getPanelElementTemplate(GetPanelElementTemplateEvent $event)
    {
        if (!$this->scopeDeterminator->currentScopeIsBackend()) {
            return;
        }

        if ($event->getTemplate()) {
            return;
        }

        $element = $event->getElement();

        if ($element instanceof FilterElementInterface) {
            $event->setTemplate(new ContaoBackendViewTemplate('dcbe_general_panel_filter'));
        } elseif ($element instanceof LimitElementInterface) {
            $event->setTemplate(new ContaoBackendViewTemplate('dcbe_general_panel_limit'));
        } elseif ($element instanceof SearchElementInterface) {
            $event->setTemplate(new ContaoBackendViewTemplate('dcbe_general_panel_search'));
        } elseif ($element instanceof SortElementInterface) {
            $event->setTemplate(new ContaoBackendViewTemplate('dcbe_general_panel_sort'));
        } elseif ($element instanceof SubmitElementInterface) {
            $event->setTemplate(new ContaoBackendViewTemplate('dcbe_general_panel_submit'));
        }
    }
public function getPanelElementTemplate ( GetPanelElementTemplateEvent $ event ) { if ( ! $ this -> scopeDeterminator -> currentScopeIsBackend ( ) ) { return ; } if ( $ event -> getTemplate ( ) ) { return ; } $ element = $ event -> getElement ( ) ; if ( $ element instanceof FilterElementInterface ) { $ event -> setTemplate ( new ContaoBackendViewTemplate ( 'dcbe_general_panel_filter' ) ) ; } elseif ( $ element instanceof LimitElementInterface ) { $ event -> setTemplate ( new ContaoBackendViewTemplate ( 'dcbe_general_panel_limit' ) ) ; } elseif ( $ element instanceof SearchElementInterface ) { $ event -> setTemplate ( new ContaoBackendViewTemplate ( 'dcbe_general_panel_search' ) ) ; } elseif ( $ element instanceof SortElementInterface ) { $ event -> setTemplate ( new ContaoBackendViewTemplate ( 'dcbe_general_panel_sort' ) ) ; } elseif ( $ element instanceof SubmitElementInterface ) { $ event -> setTemplate ( new ContaoBackendViewTemplate ( 'dcbe_general_panel_submit' ) ) ; } }
Create a template instance for the default panel elements if none has been created yet.

@param GetPanelElementTemplateEvent $event The event.

@return void
Create a template instance for the default panel elements if none has been created yet .