(non-PHPdoc).

@see \Sonata\AdminBundle\Admin\Admin::configureRoutes()
193285
protected function configureRoutes(RouteCollection $collection)
    {
        parent::configureRoutes($collection);
        if (!$this->getAllowToAdd()) {
            $collection->remove('create');
        }
    }
951051
private function _configureCpResources()
	{
		Event::on(
			View::class,
			View::EVENT_BEFORE_RENDER_TEMPLATE,
			function(TemplateEvent $event)
			{
				$viewService = Craft::$app->getView();
				$viewService->registerAssetBundle(MainAsset::class);
			}
		);
	}
374198
protected function configure() {
		parent::configure();

		if (($tmp = $this->options['tmpPath'])) {
			if (!file_exists($tmp)) {
				if (@mkdir($tmp)) {
					@chmod($tmp, $this->options['tmbPathMode']);
				}
			}
			
			$this->tmpPath = is_dir($tmp) && is_writable($tmp) ? $tmp : false;
		}
		
		if (!$this->tmpPath && $this->tmbPath && $this->tmbPathWritable) {
			$this->tmpPath = $this->tmbPath;
		}

		$this->mimeDetect = 'internal';
	}
351020
protected function configure(): void
    {
        parent::configure();

        $this->addOption(
            $this->getDisableLockCommandOptionName(),
            '',
            InputOption::VALUE_NONE,
            'Disable command locking'
        );
    }
991414
protected function configure()
    {
        $this->configureCommand();

        foreach ($this->interactiveQuestsion as $argumentName => $question) {
            $this->addOption($this->escapeArgument($argumentName), null, InputOption::VALUE_OPTIONAL, $question->getQuestion());
        }
    }
44310
protected function configureRoutes(\Sonata\AdminBundle\Route\RouteCollection $collection)
    {
        parent::configureRoutes($collection);

        $collection->clearExcept(array('create', 'edit', 'delete'));
    }
1219569
private function _configure()
    {
        \Twig_Autoloader::register();

        $loader         =  new \Twig_Loader_Filesystem($this->_basePath);

        $cache_path = defined('CACHE_PATH') ? CACHE_PATH : 'cache';
        $this->_twig = new \Twig_Environment($loader,
            array(
                'debug'      => true,
                'autoreload' => false,
                'autoescape' => true,
                'cache'      => $cache_path,
            ));
        $this->_twig->getExtension('core')->setNumberFormat(2, '.', ',');
        //$this->_twig->addFilter(
            //'nonce',
            //new \Twig_Filter_Function(function($str) {
                //$app=$GLOBALS['app'];
                //if (strpos($str, '?') !== false) {
                    //return $str.'&rand_token='.$app->getSessionManager()->getActiveSession()->getAttribute('nonce');
                //}
                //return $str.'?rand_token='.$app->getSessionManager()->getActiveSession()->getAttribute('nonce');
        //})
        //);
        $this->_twig->addFilter(
            'truncate',
            new \Twig_Filter_Function('StringFilter::truncate')
        );
        $this->_twig->addFilter(
            'isToday',
            new \Twig_Filter_Function('DateFilter::isToday')
        );
        $this->_twig->addFilter(
            'isTomorrow',
            new \Twig_Filter_Function('DateFilter::isTomorrow')
        );
        $this->_twig->addFilter(
            'isLater',
            new \Twig_Filter_Function('DateFilter::isLater')
        );

    }
1230490
protected function configure()
    {
        $this
            ->setName($this->getName())
            ->setDescription($this->getDescription())
            ->addOption(
                'storage',
                null,
                InputOption::VALUE_OPTIONAL,
                'Environment Location Storage',
                $this->getDefaultFileName()
            );
    }
317552
protected function configure()
    {
        $this->aroot = realpath($this->root);
        $root = $this->stat($this->root);

        if ($this->options['quarantine']) {
            $this->attributes[] = array(
                'pattern' => '~^'.preg_quote(DIRECTORY_SEPARATOR.$this->options['quarantine']).'$~',
                'read'    => false,
                'write'   => false,
                'locked'  => true,
                'hidden'  => true
            );
        }

        // chek thumbnails path
        if ($this->options['tmbPath']) {
            $this->options['tmbPath'] = strpos($this->options['tmbPath'], DIRECTORY_SEPARATOR) === false
                // tmb path set as dirname under root dir
                ? $this->root.DIRECTORY_SEPARATOR.$this->options['tmbPath']
                // tmb path as full path
                : $this->_normpath($this->options['tmbPath']);
        }

        parent::configure();

        // if no thumbnails url - try detect it
        if ($root['read'] && !$this->tmbURL && $this->URL) {
            if (strpos($this->tmbPath, $this->root) === 0) {
                $this->tmbURL = $this->URL.str_replace(DIRECTORY_SEPARATOR, '/', substr($this->tmbPath, strlen($this->root)+1));
                if (preg_match("|[^/?&=]$|", $this->tmbURL)) {
                    $this->tmbURL .= '/';
                }
            }
        }

        // check quarantine dir
        if (!empty($this->options['quarantine'])) {
            $this->quarantine = $this->root.DIRECTORY_SEPARATOR.$this->options['quarantine'];
            if ((!is_dir($this->quarantine) && !$this->_mkdir($this->root, $this->options['quarantine'])) || !is_writable($this->quarantine)) {
                $this->archivers['extract'] = array();
                $this->disabled[] = 'extract';
            }
        } else {
            $this->archivers['extract'] = array();
            $this->disabled[] = 'extract';
        }

    }
1266094
protected function configure()
    {
        $this->addArgument(
            'stage',
            InputArgument::OPTIONAL,
            'Stage or hostname'
        );
        $this->addOption(
            'parallel',
            'p',
            Option::VALUE_NONE,
            'Run tasks in parallel'
        );
        $this->addOption(
            'limit',
            'l',
            Option::VALUE_REQUIRED,
            'How many host to run in parallel?'
        );
        $this->addOption(
            'no-hooks',
            null,
            Option::VALUE_NONE,
            'Run task without after/before hooks'
        );
        $this->addOption(
            'log',
            null,
            Option::VALUE_REQUIRED,
            'Log to file'
        );
        $this->addOption(
            'roles',
            null,
            Option::VALUE_REQUIRED,
            'Roles to deploy'
        );
        $this->addOption(
            'hosts',
            null,
            Option::VALUE_REQUIRED,
            'Host to deploy, comma separated, supports ranges [:]'
        );
        $this->addOption(
            'option',
            'o',
            Option::VALUE_REQUIRED | Option::VALUE_IS_ARRAY,
            'Sets configuration option'
        );
    }
671254
protected function configure()
    {
        $this->bind()->annotatedWith(ImportAppConfig::class)->toInstance($this->importAppConfig);
        $this->bind(SchemeCollectionInterface::class)->toProvider(ImportSchemeCollectionProvider::class);
    }
78600
private function configure()
    {
        $analyticsConfig = $this->googleServicesCore->getConfig('analytics');
        
        if (array_key_exists('viewId', $analyticsConfig)) {
            $this->viewId = $analyticsConfig['viewId'];
        }
    }
1031443
private function configure(): void
    {
        $services = array_keys($this->container->findTaggedServiceIds('app.service'));
        foreach ($services as $service) {
            $service = $this->container->get($service);
            $this->services[$service->getName()] = $service;
        }
    }
1288292
private function configureSslValidation()
    {
        // set SSL validation for the CAS server
        if ($this->config['cas_validation'] == 'ca' || $this->config['cas_validation'] == 'self')
        {
            phpCAS::setCasServerCACert($this->config['cas_cert']);
        }
        else
        {
            phpCAS::setNoCasServerValidation();
        }
    }
1322889
protected function configureService()
    {
        // Translations
        $this['locale_fallbacks'] = array('en_US');
        $this->register(new TranslationServiceProvider());

        $translator = $this['translator'];
        $translator->addLoader('yaml', new RecursiveYamlFileMessageLoader());

        $files = glob($this->getRootPath() .'/app/l10n/*.yml');
        foreach ($files as $filename) {
            $locale = str_replace('.yml', '', basename($filename));
            $translator->addResource('yaml', $filename, $locale);
        }
    }
708023
protected function configure()
    {
        $this->value('builder', $this->builder);
        $this->value('frameworkBuilder', $this->builder->frameworkBuilder());
        $this->value('components', $this->builder->components());
    }
50515
protected function configure()
    {
        $this
            ->addArgument('stores', InputArgument::IS_ARRAY | InputArgument::REQUIRED,
                'A list of stores to re-encrypt.')
            ->addOption(
                'new-profile',
                null,
                InputOption::VALUE_REQUIRED,
                'The new profile the current data is encrypted with.',
                null
            )
            ->addOption(
                'offset',
                null,
                InputOption::VALUE_REQUIRED,
                'Starting record',
                0
            )
            ->addOption(
                'limit',
                null,
                InputOption::VALUE_REQUIRED,
                'Max records to process',
                null
            )
            ->addOption(
                'batch-size',
                null,
                InputOption::VALUE_REQUIRED,
                'Records per batch to process',
                1
            );
    }