getEnvironment(), array('dev', 'test'))) { //$bundles[] = new Jjanvier\Bundle\CrowdinBundle\JjanvierCrowdinBundle(); $bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle(); $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle(); $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle(); $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle(); } return $bundles; } /** * @param LoaderInterface $loader */ public function registerContainerConfiguration(LoaderInterface $loader) { $loader->load($this->getRootDir().'/config/config_'.$this->getEnvironment().'.yml'); } /** * @return string */ public function getRootDir() { if (null === $this->rootDir) { $r = new \ReflectionObject($this); $this->rootDir = str_replace('\\', '/', dirname($r->getFileName())); } return $this->rootDir; } /** * Returns the real root path * @return string */ public function getRealRootDir() { return realpath($this->getRootDir().'/../').'/'; } /** * Returns the data path * @return string */ public function getDataDir() { return $this->getAppDir().'courses/'; } /** * @return string */ public function getAppDir() { return $this->getRealRootDir().'app/'; } /** * @return string */ public function getConfigDir() { return $this->getRealRootDir().'app/config/'; } /** * If Chamilo is installed in my.chamilo.net return '' * If Chamilo is installed in my.chamilo.net/chamilo return 'chamilo' * @return string */ public function getUrlAppend() { return $this->getContainer()->getParameter('url_append'); } /** * @return string */ public function getConfigurationFile() { return $this->getRealRootDir().'app/config/configuration.php'; } /** * Check if system is installed * @return bool */ public function isInstalled() { return !empty($this->getContainer()->getParameter('installed')); } }