src/Contao/View/Contao2BackendView/TreePicker.php
private function generateToggleUrl(ModelInterface $model)
    {
        $toggleUrlEvent = new AddToUrlEvent(
            'ptg=' . $model->getId() . '&amp;provider=' . $model->getProviderName()
        );
        $this->getEnvironment()->getEventDispatcher()->dispatch(ContaoEvents::BACKEND_ADD_TO_URL, $toggleUrlEvent);

        return System::getContainer()->get('router')->generate(
            'cca_dc_general_tree_toggle',
            $this->getQueryParameterFromUrl($toggleUrlEvent->getUrl()),
            UrlGenerator::ABSOLUTE_URL
        );
    }
private function generateToggleUrl(ModelInterface $model)
    {
        $toggleUrlEvent = new AddToUrlEvent(
            'ptg=' . $model->getId() . '&amp;provider=' . $model->getProviderName()
        );
        $this->getEnvironment()->getEventDispatcher()->dispatch(ContaoEvents::BACKEND_ADD_TO_URL, $toggleUrlEvent);

        return System::getContainer()->get('router')->generate(
            'cca_dc_general_tree_toggle',
            $this->getQueryParameterFromUrl($toggleUrlEvent->getUrl()),
            UrlGenerator::ABSOLUTE_URL
        );
    }
private function generateToggleUrl ( ModelInterface $ model ) { $ toggleUrlEvent = new AddToUrlEvent ( 'ptg=' . $ model -> getId ( ) . '&amp;provider=' . $ model -> getProviderName ( ) ) ; $ this -> getEnvironment ( ) -> getEventDispatcher ( ) -> dispatch ( ContaoEvents :: BACKEND_ADD_TO_URL , $ toggleUrlEvent ) ; return System :: getContainer ( ) -> get ( 'router' ) -> generate ( 'cca_dc_general_tree_toggle' , $ this -> getQueryParameterFromUrl ( $ toggleUrlEvent -> getUrl ( ) ) , UrlGenerator :: ABSOLUTE_URL ) ; }
Generate the toggle url.

@param ModelInterface $model The model.

@return string
Generate the toggle url .