I try to install Sonata Admin with my Symfony. I follow the instruction of the link http://sonata-project.org/bundles/admin/master/doc/reference/getting_started.html .
I choose file format is admin.yml. When I run php app/console assets:install
I got the error
Here are my admin.yml
In your extension file DemoBundle\\DependencyInjection\\DemobundleExtension (or whatever you named it), you should load the configuration file with Loader\\YamlFileLoader, you are probably doing it with Loader\\XmlFileLoader
class DemobundleExtension extends Extension
{
public function load(array $configs, ContainerBuilder $container)
{
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
$loader->load('admin.yml');
}
}
Thanks,
I change it to admin.xml and it works. Thanks for your help
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.