0
我有一個CampusCalendarBundle
擴展名。在我添加DependencyInjection
文件夾後加載配置文件。我有這個錯誤。我不認爲system_configuration.yml
已被加載。加載服務配置時出錯
[RuntimeException]
[Symfony\Component\Config\Definition\Exception\InvalidConfigurationException]
The system configuration variable "oro_calendar.calendar_colors" is not
defined. Please make sure that it is either added to bundle
configuration settings or marked as "ui_only" in config.
<?php
namespace CampusCRM\CampusCalendarBundle\DependencyInjection;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
use Symfony\Component\DependencyInjection\Loader;
class CampusCalendarExtension extends Extension
{
/**
* {@inheritDoc}
*/
public function load(array $configs, ContainerBuilder $container)
{
$configuration = new Configuration();
$config = $this->processConfiguration($configuration, $configs);
$container->setParameter(
'oro_calendar.enabled_system_calendar',
$config['enabled_system_calendar']
);
$container->prependExtensionConfig($this->getAlias(), array_intersect_key($config, array_flip(['settings'])));
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
$loader->load('services.yml');
$loader->load('form.yml');
}
}
這裏是擴展束。
<?php
// src/CampusCRM/CampusCalendarBundle/CampusCalendarBundle.php
namespace CampusCRM\CampusCalendarBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class CampusCalendarBundle extends Bundle
{
public function getParent()
{
return 'OroCalendarBundle';
}
}
你應該提供這個Bundle Extension的鏈接,也許對我們更好。 –
迴應您以前的問題評論,你可能會得到幫助! –
對不起,我不確定Bundle Extension提供什麼。 'CampusCalendarBundle'擴展'OroCalendarBundle'。你想看看'OroCalendarBundle'嗎?這裏是[OroCalendarBundle]的鏈接(https://github.com/orocrm/OroCalendarBundle) –