src/EventListener/RenderItemListListener.php
private function generateAddUrl(array $page): string
    {
        $event = new GenerateFrontendUrlEvent($page, null, $page['language']);

        $this->dispatcher->dispatch(ContaoEvents::CONTROLLER_GENERATE_FRONTEND_URL, $event);

        $url = UrlBuilder::fromUrl($event->getUrl() . '?')
            ->setQueryParameter('act', 'create');

        return $url->getUrl();
    }
private function generateAddUrl(array $page): string
    {
        $event = new GenerateFrontendUrlEvent($page, null, $page['language']);

        $this->dispatcher->dispatch(ContaoEvents::CONTROLLER_GENERATE_FRONTEND_URL, $event);

        $url = UrlBuilder::fromUrl($event->getUrl() . '?')
            ->setQueryParameter('act', 'create');

        return $url->getUrl();
    }
private function generateAddUrl ( array $ page ) : string { $ event = new GenerateFrontendUrlEvent ( $ page , null , $ page [ 'language' ] ) ; $ this -> dispatcher -> dispatch ( ContaoEvents :: CONTROLLER_GENERATE_FRONTEND_URL , $ event ) ; $ url = UrlBuilder :: fromUrl ( $ event -> getUrl ( ) . '?' ) -> setQueryParameter ( 'act' , 'create' ) ; return $ url -> getUrl ( ) ; }
Generate the url to add an item.

@param array $page The page details.

@return string
Generate the url to add an item .