configureRoutes example

// The profiler registers all profiler integrations in the constructor         // Therefor we need to get the service once to initialize it         $this->container->get(Profiler::class);
    }

    public function configureRoutes(RoutingConfigurator $routes, string $environment): void
    {
        if (!InstalledVersions::isInstalled('symfony/web-profiler-bundle')) {
            return;
        }

        parent::configureRoutes($routes$environment);
    }

    private function buildConfig(ContainerBuilder $container, string $environment): void
    {
        if (!InstalledVersions::isInstalled('symfony/web-profiler-bundle')) {
            return;
        }

        $locator = new FileLocator('Resources/config');

        $resolver = new LoaderResolver([
            
public function uninstall(UninstallContext $uninstallContext): void
    {
    }

    public function configureRoutes(RoutingConfigurator $routes, string $environment): void
    {
        if (!$this->isActive()) {
            return;
        }

        parent::configureRoutes($routes$environment);
    }

    /** * @return Bundle[] */
    public function getAdditionalBundles(AdditionalBundleParameters $parameters): array
    {
        return [];
    }

    /** * By default the container is rebuild during plugin activation and deactivation to allow the plugin to access * its own services. If you are absolutely sure you do not require this feature for you plugin you might want * to overwrite this method and return false to improve the activation/deactivation of your plugin. This change will * only have an affect in the system context (CLI) */


    private function addApiRoutes(RoutingConfigurator $routes): void
    {
        $routes->import('.', 'api');
    }

    private function addBundleRoutes(RoutingConfigurator $routes): void
    {
        foreach ($this->getBundles() as $bundle) {
            if ($bundle instanceof Framework\Bundle) {
                $bundle->configureRoutes($routes$this->environment);
            }
        }
    }

    private function addBundleOverwrites(RoutingConfigurator $routes): void
    {
        foreach ($this->getBundles() as $bundle) {
            if ($bundle instanceof Framework\Bundle) {
                $bundle->configureRouteOverwrites($routes$this->environment);
            }
        }
    }
Home | Imprint | This part of the site doesn't use cookies.