Example #1
0
 public function getConfiguration($environment)
 {
     $config = new ConfigurationBuilder();
     if (file_exists($routingFile = $this->getPath() . '/Resources/config/routing.yml')) {
         $config->addRoutingResource($routingFile, null, strtolower($this->getName()));
     }
     return $config;
 }
 public function suggestConfigurationFor(Bundle $bundle, $environment)
 {
     $config = new ConfigurationBuilder();
     $bundleClass = get_class($bundle);
     $simpleConfigs = array('HWI\\Bundle\\OAuthBundle\\HWIOAuthBundle' => 'hwi_oauth');
     if (isset($simpleConfigs[$bundleClass])) {
         return $config->addContainerResource($this->buildPath($simpleConfigs[$bundleClass]));
     }
 }
 /**
  * @todo find a way to remove this without breaking everything
  */
 public function suggestConfigurationFor(Bundle $bundle, $environment)
 {
     $bundleClass = get_class($bundle);
     $config = new ConfigurationBuilder();
     $simpleConfigs = array('JMS\\Payment\\CoreBundle\\JMSPaymentCoreBundle' => 'jms_payment_core', 'JMS\\Payment\\PaypalBundle\\JMSPaymentPaypalBundle' => 'jms_payment_paypal');
     if (isset($simpleConfigs[$bundleClass])) {
         return $config->addContainerResource($this->buildPath($simpleConfigs[$bundleClass]));
     }
 }
 public function suggestConfigurationFor(Bundle $bundle, $environment)
 {
     $config = new ConfigurationBuilder();
     $bundleClass = get_class($bundle);
     $simpleConfigs = ['Knp\\Bundle\\SnappyBundle\\KnpSnappyBundle' => 'knp_snappy'];
     if (isset($simpleConfigs[$bundleClass])) {
         return $config->addContainerResource($this->buildPath($simpleConfigs[$bundleClass]));
     }
 }
Example #5
0
 public function suggestConfigurationFor(Bundle $bundle, $environment)
 {
     $bundleClass = get_class($bundle);
     $config = new ConfigurationBuilder();
     // no special configuration, work in any environment
     $emptyConfigs = array('Doctrine\\Bundle\\FixturesBundle\\DoctrineFixturesBundle', 'FOS\\JsRoutingBundle\\FOSJsRoutingBundle', 'JMS\\AopBundle\\JMSAopBundle', 'JMS\\TwigJsBundle\\JMSTwigJsBundle', 'WhiteOctober\\PagerfantaBundle\\WhiteOctoberPagerfantaBundle', 'Claroline\\MigrationBundle\\ClarolineMigrationBundle', 'Claroline\\Bundle\\FrontEndBundle\\FrontEndBundle', 'JMS\\SerializerBundle\\JMSSerializerBundle');
     // simple container configuration, same for every environment
     $simpleConfigs = array('Symfony\\Bundle\\SecurityBundle\\SecurityBundle' => 'security', 'Symfony\\Bundle\\TwigBundle\\TwigBundle' => 'twig', 'Symfony\\Bundle\\AsseticBundle\\AsseticBundle' => 'assetic', 'JMS\\DiExtraBundle\\JMSDiExtraBundle' => 'jms_di_extra', 'JMS\\SecurityExtraBundle\\JMSSecurityExtraBundle' => 'jms_security_extra', 'Stof\\DoctrineExtensionsBundle\\StofDoctrineExtensionsBundle' => 'stof_doctrine_extensions', 'BeSimple\\SsoAuthBundle\\BeSimpleSsoAuthBundle' => 'sso', 'Stfalcon\\Bundle\\TinymceBundle\\StfalconTinymceBundle' => 'stfalcon_tinymce', 'Sensio\\Bundle\\FrameworkExtraBundle\\SensioFrameworkExtraBundle' => 'sensio_framework_extra', 'FOS\\RestBundle\\FOSRestBundle' => 'fos_rest', 'Gregwar\\CaptchaBundle\\GregwarCaptchaBundle' => 'gregwar_captcha', 'Knp\\Bundle\\MenuBundle\\KnpMenuBundle' => 'knp_menu');
     // one configuration file for every standard environment (prod, dev, test)
     $envConfigs = array('Symfony\\Bundle\\FrameworkBundle\\FrameworkBundle' => 'framework', 'Symfony\\Bundle\\MonologBundle\\MonologBundle' => 'monolog', 'Symfony\\Bundle\\SwiftmailerBundle\\SwiftmailerBundle' => 'swiftmailer', 'Doctrine\\Bundle\\DoctrineBundle\\DoctrineBundle' => 'doctrine');
     if (in_array($bundleClass, $emptyConfigs)) {
         return $config;
     } elseif (isset($simpleConfigs[$bundleClass])) {
         return $config->addContainerResource($this->buildPath($simpleConfigs[$bundleClass]));
     } elseif (isset($envConfigs[$bundleClass])) {
         if (in_array($environment, array('prod', 'dev', 'test'))) {
             return $config->addContainerResource($this->buildPath("{$envConfigs[$bundleClass]}_{$environment}"));
         }
     } elseif ($bundle instanceof \Bazinga\Bundle\JsTranslationBundle\BazingaJsTranslationBundle) {
         return $config->addRoutingResource($this->buildPath('bazinga_routing'));
     } elseif ($bundle instanceof FOSOAuthServerBundle) {
         $config = new ConfigurationBuilder();
         $config->addContainerResource($this->buildPath('fos_oauth_server_config'))->addRoutingResource($this->buildPath('fos_oauth_server_routing'));
         return $config;
     } elseif ($bundle instanceof NelmioApiDocBundle) {
         $config = new ConfigurationBuilder();
         $config->addContainerResource($this->buildPath('nelmio_api_doc_config'))->addRoutingResource($this->buildPath('nelmio_api_doc_routing'));
         return $config;
     } elseif ($bundle instanceof IDCIExporterBundle) {
         $config = new ConfigurationBuilder();
         $config->addContainerResource($this->buildPath('idci_exporter'))->addRoutingResource($this->buildPath('idci_exporter_routing'));
         return $config;
     } elseif ($bundle instanceof ZenstruckFormBundle) {
         $config = new ConfigurationBuilder();
         $config->addContainerResource($this->buildPath('zenstruck_form'))->addRoutingResource($this->buildPath('zenstruck_form_routing'));
         return $config;
     } elseif (in_array($environment, array('dev', 'test'))) {
         if ($bundle instanceof \Symfony\Bundle\WebProfilerBundle\WebProfilerBundle) {
             return $config->addContainerResource($this->buildPath('web_profiler'))->addRoutingResource($this->buildPath('web_profiler_routing'));
         } elseif ($bundle instanceof \Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle) {
             return $config;
         }
     }
     return false;
 }
 public function getConfiguration($environment)
 {
     $config = new ConfigurationBuilder();
     return $config->addRoutingResource(__DIR__ . '/Resources/config/routing.yml');
 }
 public function getConfiguration($environment)
 {
     $config = new ConfigurationBuilder();
     return $config->addRoutingResource($this->getPath() . '/Resources/config/routing.yml')->addContainerResource($this->getPath() . '/Resources/config/idci_exporter.yml')->addContainerResource($this->getPath() . '/Resources/config/doctrine.yml')->addContainerResource($this->getPath() . '/Resources/config/twig.yml');
 }
 public function getConfiguration($environment)
 {
     $config = new ConfigurationBuilder();
     return $config->addRoutingResource(__DIR__ . '/Resources/config/routing.yml', null, 'clarolinelayoutoverride');
 }
 public function getConfiguration($environment)
 {
     $config = new ConfigurationBuilder();
     $config->addRoutingResource(__DIR__ . '/Resources/config/routing.yml', null, 'icap_blog')->addContainerResource($this->getPath() . '/Resources/config/twig.yml')->addContainerResource($this->getPath() . '/Resources/config/parameters.yml');
     return $config;
 }