我有一个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';
}
}
答案 0 :(得分:0)
我发现了一个解决方案!我可能不小心删除了Ext.define('MyApp.view.main.UserForm', {
extend: 'Ext.form.Panel',
xtype: 'userform',
//layout:'card',
requires: [
'MyApp.store.Personnel'
],
itemId: 'user_form',
title: 'Personnel',
controller: 'main',
viewModel: 'main',
store: {
type: 'personnel'
},
height: 500,
layout: {
type: 'card'
},
// Allow scrollbar (in this example, according to the above height, we should only have horizontal scrollbars)
scrollable: true,
tbar: [{
text: 'Prev',
action: 'back',
disabled: true,
handler: function(btn) {
var panel = btn.up('panel'),
activeItem = panel.getLayout().getActiveItem(),
activeIdx = panel.items.indexOf(activeItem);
if (--activeIdx >= 0) {
panel.getLayout().setActiveItem(activeIdx);
}
panel.down('button[action=next]').setDisabled(!panel.getLayout().getNext());
panel.down('button[action=back]').setDisabled(!panel.getLayout().getPrev());
panel.down('button[action=finish]').setDisabled(panel.getLayout().getNext());
}
}, '->', {
text: 'Next',
action: 'next',
handler: function(btn) {
var panel = btn.up('panel'),
activeItem = panel.getLayout().getActiveItem(),
activeIdx = panel.items.indexOf(activeItem),
total = panel.items.getCount() - 1;
if (activeIdx !== -1 && ++activeIdx <= total) {
panel.getLayout().setActiveItem(activeIdx);
}
panel.down('button[action=next]').setDisabled(!panel.getLayout().getNext());
panel.down('button[action=back]').setDisabled(!panel.getLayout().getPrev());
panel.down('button[action=finish]').setDisabled(panel.getLayout().getNext());
}
}, '->', {
text: 'Finish',
action: 'finish',
disabled: true,
handler: 'save'
}],
items: [{
xtype: 'panel',
//itemId: panelOneId,
title: 'Panel 1',
items: [{
xtype: 'textfield',
name: 'name',
fieldLabel: 'Name',
allowBlank: false,
}]
}, {
xtype: 'panel',
title: 'Panel 2',
items: [{
xtype: 'textfield',
name: 'email',
fieldLabel: 'Email ID',
allowBlank: false,
//minLength: 3
}]
}, {
xtype: 'panel',
title: 'Panel 3',
items: [{
xtype: 'textfield',
name: 'phone',
fieldLabel: 'Phone Number',
allowBlank: false,
//minLength: 3
}]
}]
});
中的一些代码。用刷新安装替换OroCalendarBundle
后,一切正常。
谢谢大家的帮助〜