diff --git a/composer.json b/composer.json
index 216672d9..d52084dc 100644
--- a/composer.json
+++ b/composer.json
@@ -25,7 +25,7 @@
"doctrine/phpcr-bundle": "^1.3 || ^2.0",
"doctrine/phpcr-odm": "^1.4 || ^2.0",
"sonata-project/admin-bundle": "^3.30.1",
- "sonata-project/block-bundle": "^3.9",
+ "sonata-project/block-bundle": "^3.11",
"symfony-cmf/resource-rest-bundle": "^1.0.1",
"symfony-cmf/tree-browser-bundle": "^2.0",
"symfony/config": "^2.8 || ^3.2",
diff --git a/docs/reference/configuration.rst b/docs/reference/configuration.rst
index 84cb994a..bfc5371d 100644
--- a/docs/reference/configuration.rst
+++ b/docs/reference/configuration.rst
@@ -15,10 +15,10 @@ On this bundle, you can configure templates and the document tree.
templates:
form:
# Default:
- - SonataDoctrinePHPCRAdminBundle:Form:form_admin_fields.html.twig
+ - "@SonataDoctrinePHPCRAdmin/Form/form_admin_fields.html.twig"
filter:
# Default:
- - SonataDoctrinePHPCRAdminBundle:Form:filter_admin_fields.html.twig
+ - "@SonataDoctrinePHPCRAdmin/Form/filter_admin_fields.html.twig"
types:
list:
# Prototype
@@ -26,7 +26,7 @@ On this bundle, you can configure templates and the document tree.
show:
# Prototype
name: []
- pager_results: SonataDoctrinePHPCRAdminBundle:Pager:simple_pager_results.html.twig
+ pager_results: "@SonataDoctrinePHPCRAdmin/Pager/simple_pager_results.html.twig"
document_tree:
# See :doc:`document_tree`.
diff --git a/src/Block/TreeBlockService.php b/src/Block/TreeBlockService.php
index b0d05665..00a3d95f 100644
--- a/src/Block/TreeBlockService.php
+++ b/src/Block/TreeBlockService.php
@@ -68,7 +68,7 @@ public function configureSettings(OptionsResolver $resolver)
// see https://github.com/sonata-project/SonataDoctrinePhpcrAdminBundle/pull/345
$resolver->setDefaults([
'template' => function (Options $options, $value) {
- return $value ?: 'SonataDoctrinePHPCRAdminBundle:Block:tree.html.twig';
+ return $value ?: '@SonataDoctrinePHPCRAdmin/Block/tree.html.twig';
},
'id' => function (Options $options, $value) {
return $value ?: '/';
diff --git a/src/Builder/ListBuilder.php b/src/Builder/ListBuilder.php
index b8032bf3..e3c4a022 100644
--- a/src/Builder/ListBuilder.php
+++ b/src/Builder/ListBuilder.php
@@ -161,19 +161,19 @@ public function fixFieldDescription(AdminInterface $admin, FieldDescriptionInter
$fieldDescription->setTemplate($this->getTemplate($fieldDescription->getType()));
if (ClassMetadata::MANY_TO_ONE == $fieldDescription->getMappingType()) {
- $fieldDescription->setTemplate('SonataAdminBundle:CRUD/Association:list_many_to_one.html.twig');
+ $fieldDescription->setTemplate('@SonataAdmin/CRUD/Association/list_many_to_one.html.twig');
}
if (ClassMetadata::MANY_TO_MANY == $fieldDescription->getMappingType()) {
- $fieldDescription->setTemplate('SonataAdminBundle:CRUD/Association:list_many_to_many.html.twig');
+ $fieldDescription->setTemplate('@SonataAdmin/CRUD/Association/list_many_to_many.html.twig');
}
if ('child' == $fieldDescription->getMappingType() || 'parent' == $fieldDescription->getMappingType()) {
- $fieldDescription->setTemplate('SonataAdminBundle:CRUD/Association:list_one_to_one.html.twig');
+ $fieldDescription->setTemplate('@SonataAdmin/CRUD/Association/list_one_to_one.html.twig');
}
if ('children' == $fieldDescription->getMappingType() || 'referrers' == $fieldDescription->getMappingType()) {
- $fieldDescription->setTemplate('SonataAdminBundle:CRUD/Association:list_one_to_many.html.twig');
+ $fieldDescription->setTemplate('@SonataAdmin/CRUD/Association/list_one_to_many.html.twig');
}
}
@@ -202,7 +202,7 @@ public function fixFieldDescription(AdminInterface $admin, FieldDescriptionInter
public function buildActionFieldDescription(FieldDescriptionInterface $fieldDescription)
{
if (null === $fieldDescription->getTemplate()) {
- $fieldDescription->setTemplate('SonataAdminBundle:CRUD:list__action.html.twig');
+ $fieldDescription->setTemplate('@SonataAdmin/CRUD/list__action.html.twig');
}
if (null === $fieldDescription->getType()) {
@@ -221,7 +221,7 @@ public function buildActionFieldDescription(FieldDescriptionInterface $fieldDesc
$actions = $fieldDescription->getOption('actions');
foreach ($actions as $k => $action) {
if (!isset($action['template'])) {
- $actions[$k]['template'] = sprintf('SonataAdminBundle:CRUD:list__action_%s.html.twig', $k);
+ $actions[$k]['template'] = sprintf('@SonataAdmin/CRUD/list__action_%s.html.twig', $k);
}
}
diff --git a/src/Builder/ShowBuilder.php b/src/Builder/ShowBuilder.php
index 04e68862..e75c896b 100644
--- a/src/Builder/ShowBuilder.php
+++ b/src/Builder/ShowBuilder.php
@@ -104,11 +104,11 @@ public function fixFieldDescription(AdminInterface $admin, FieldDescriptionInter
$fieldDescription->setTemplate($this->getTemplate($fieldDescription->getType()));
if (ClassMetadata::MANY_TO_ONE == $fieldDescription->getMappingType()) {
- $fieldDescription->setTemplate('SonataAdminBundle:CRUD/Association:show_many_to_one.html.twig');
+ $fieldDescription->setTemplate('@SonataAdmin/CRUD/Association/show_many_to_one.html.twig');
}
if (ClassMetadata::MANY_TO_MANY == $fieldDescription->getMappingType()) {
- $fieldDescription->setTemplate('SonataAdminBundle:CRUD/Association:show_many_to_many.html.twig');
+ $fieldDescription->setTemplate('@SonataAdmin/CRUD/Association/show_many_to_many.html.twig');
}
}
diff --git a/src/Controller/TreeController.php b/src/Controller/TreeController.php
index 56497537..f82ce9e6 100644
--- a/src/Controller/TreeController.php
+++ b/src/Controller/TreeController.php
@@ -26,7 +26,7 @@ class TreeController extends Controller
/**
* @var string
*/
- private $template = 'SonataDoctrinePHPCRAdminBundle:Tree:tree.html.twig';
+ private $template = '@SonataDoctrinePHPCRAdmin/Tree/tree.html.twig';
/**
* @var \PHPCR\SessionInterface
diff --git a/src/DependencyInjection/Compiler/AddTreeBrowserAssetsPass.php b/src/DependencyInjection/Compiler/AddTreeBrowserAssetsPass.php
index e207b5ed..a88f087f 100644
--- a/src/DependencyInjection/Compiler/AddTreeBrowserAssetsPass.php
+++ b/src/DependencyInjection/Compiler/AddTreeBrowserAssetsPass.php
@@ -47,7 +47,7 @@ private function addAssetsToAdminPool(Definition $definition)
private function addFormResources(ContainerBuilder $container)
{
$resources = $container->getParameter('twig.form.resources');
- $resources[] = 'SonataDoctrinePHPCRAdminBundle:Form:tree_browser_fields.html.twig';
+ $resources[] = '@SonataDoctrinePHPCRAdmin/Form/tree_browser_fields.html.twig';
$container->setParameter('twig.form.resources', $resources);
}
diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php
index acea9805..98c1dd44 100644
--- a/src/DependencyInjection/Configuration.php
+++ b/src/DependencyInjection/Configuration.php
@@ -41,11 +41,11 @@ public function getConfigTreeBuilder()
->children()
->arrayNode('form')
->prototype('scalar')->end()
- ->defaultValue(['SonataDoctrinePHPCRAdminBundle:Form:form_admin_fields.html.twig'])
+ ->defaultValue(['@SonataDoctrinePHPCRAdmin/Form/form_admin_fields.html.twig'])
->end()
->arrayNode('filter')
->prototype('scalar')->end()
- ->defaultValue(['SonataDoctrinePHPCRAdminBundle:Form:filter_admin_fields.html.twig'])
+ ->defaultValue(['@SonataDoctrinePHPCRAdmin/Form/filter_admin_fields.html.twig'])
->end()
->arrayNode('types')
->children()
@@ -59,7 +59,7 @@ public function getConfigTreeBuilder()
->end()
->end()
->end()
- ->scalarNode('pager_results')->defaultValue('SonataDoctrinePHPCRAdminBundle:Pager:simple_pager_results.html.twig')->cannotBeEmpty()->end()
+ ->scalarNode('pager_results')->defaultValue('@SonataDoctrinePHPCRAdmin/Pager/simple_pager_results.html.twig')->cannotBeEmpty()->end()
->end()
->end()
->arrayNode('document_tree')
diff --git a/src/DependencyInjection/SonataDoctrinePHPCRAdminExtension.php b/src/DependencyInjection/SonataDoctrinePHPCRAdminExtension.php
index 9444a85c..29b4659a 100644
--- a/src/DependencyInjection/SonataDoctrinePHPCRAdminExtension.php
+++ b/src/DependencyInjection/SonataDoctrinePHPCRAdminExtension.php
@@ -36,13 +36,13 @@ public function load(array $configs, ContainerBuilder $container)
'templates' => [
'types' => [
'list' => [
- 'node' => 'SonataDoctrinePHPCRAdminBundle:CRUD:list_node.html.twig',
+ 'node' => '@SonataDoctrinePHPCRAdmin/CRUD/list_node.html.twig',
],
'show' => [
- 'doctrine_phpcr_many_to_many' => 'SonataAdminBundle:CRUD/Association:show_many_to_many.html.twig',
- 'doctrine_phpcr_many_to_one' => 'SonataAdminBundle:CRUD/Association:show_many_to_one.html.twig',
- 'doctrine_phpcr_one_to_many' => 'SonataAdminBundle:CRUD/Association:show_one_to_many.html.twig',
- 'doctrine_phpcr_one_to_one' => 'SonataAdminBundle:CRUD/Association:show_one_to_one.html.twig',
+ 'doctrine_phpcr_many_to_many' => '@SonataAdmin/CRUD/Association/show_many_to_many.html.twig',
+ 'doctrine_phpcr_many_to_one' => '@SonataAdmin/CRUD/Association/show_many_to_one.html.twig',
+ 'doctrine_phpcr_one_to_many' => '@SonataAdmin/CRUD/Association/show_one_to_many.html.twig',
+ 'doctrine_phpcr_one_to_one' => '@SonataAdmin/CRUD/Association/show_one_to_one.html.twig',
],
],
],
diff --git a/src/Resources/config/block.xml b/src/Resources/config/block.xml
index a37535f5..87dd2cff 100644
--- a/src/Resources/config/block.xml
+++ b/src/Resources/config/block.xml
@@ -7,7 +7,7 @@