src/Contao/Dca/Populator/BackendViewPopulator.php
protected function populatePanel(EnvironmentInterface $environment)
    {
        /** @var BackendViewInterface $view */
        $view = $environment->getView();

        // Already populated or not in Backend? Get out then.
        if (!(($view instanceof BaseView))) {
            return;
        }

        if (!$environment->getDataDefinition()->hasDefinition(Contao2BackendViewDefinitionInterface::NAME)) {
            return;
        }

        // Already populated.
        if ($view->getPanel()) {
            return;
        }

        $view->setPanel((new PanelBuilder($environment))->build());
    }
protected function populatePanel(EnvironmentInterface $environment)
    {
        /** @var BackendViewInterface $view */
        $view = $environment->getView();

        // Already populated or not in Backend? Get out then.
        if (!(($view instanceof BaseView))) {
            return;
        }

        if (!$environment->getDataDefinition()->hasDefinition(Contao2BackendViewDefinitionInterface::NAME)) {
            return;
        }

        // Already populated.
        if ($view->getPanel()) {
            return;
        }

        $view->setPanel((new PanelBuilder($environment))->build());
    }
protected function populatePanel ( EnvironmentInterface $ environment ) { /** @var BackendViewInterface $view */ $ view = $ environment -> getView ( ) ; // Already populated or not in Backend? Get out then. if ( ! ( ( $ view instanceof BaseView ) ) ) { return ; } if ( ! $ environment -> getDataDefinition ( ) -> hasDefinition ( Contao2BackendViewDefinitionInterface :: NAME ) ) { return ; } // Already populated. if ( $ view -> getPanel ( ) ) { return ; } $ view -> setPanel ( ( new PanelBuilder ( $ environment ) ) -> build ( ) ) ; }
Create a panel instance in the view if none has been defined yet.

@param EnvironmentInterface $environment The environment to populate.

@return void

@internal
Create a panel instance in the view if none has been defined yet .