Skip to content

Commit a85226b

Browse files
Merge pull request #332 from symfony-cmf/move_sonata_admin
2 parents 2d1a19d + 51f4d4a commit a85226b

File tree

10 files changed

+897
-488
lines changed

10 files changed

+897
-488
lines changed

app/AppKernel.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public function registerBundles()
4040
new Symfony\Cmf\Bundle\RoutingAutoBundle\CmfRoutingAutoBundle(),
4141
new Symfony\Cmf\Bundle\ResourceBundle\CmfResourceBundle(),
4242
new Symfony\Cmf\Bundle\ResourceRestBundle\CmfResourceRestBundle(),
43+
new Symfony\Cmf\Bundle\SonataAdminIntegrationBundle\CmfSonataAdminIntegrationBundle(),
4344

4445
// language switcher
4546
new Lunetics\LocaleBundle\LuneticsLocaleBundle(),

app/config/config.yml

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,6 @@ cmf_core:
8888
phpcr:
8989
enabled: true
9090

91-
cmf_content:
92-
persistence:
93-
phpcr:
94-
document_class: AppBundle\Document\DemoSeoContent
95-
9691
cmf_routing:
9792
chain:
9893
routers_by_id:
@@ -127,6 +122,16 @@ cmf_resource_rest:
127122
enhancer_map:
128123
- { repository: default, enhancer: sonata_admin }
129124

125+
cmf_sonata_admin_integration:
126+
bundles:
127+
seo: ~
128+
menu: ~
129+
core: ~
130+
content: ~
131+
block: ~
132+
routing: ~
133+
134+
130135
sonata_block:
131136
default_contexts: [cms]
132137
blocks:
@@ -144,30 +149,30 @@ sonata_block:
144149

145150
sonata_admin:
146151
extensions:
147-
cmf_core.admin_extension.child:
152+
cmf_sonata_admin_integration.core.extension.child:
148153
implements:
149154
- Symfony\Cmf\Bundle\CoreBundle\Model\ChildInterface
150-
cmf_core.admin_extension.publish_workflow.time_period:
155+
cmf_sonata_admin_integration.core.extension.publish_workflow.time_period:
151156
implements:
152157
- Symfony\Cmf\Bundle\CoreBundle\PublishWorkflow\PublishTimePeriodInterface
153-
cmf_core.admin_extension.publish_workflow.publishable:
158+
cmf_sonata_admin_integration.core.extension.publish_workflow.publishable:
154159
implements:
155160
- Symfony\Cmf\Bundle\CoreBundle\PublishWorkflow\PublishableInterface
156-
cmf_menu.admin_extension.menu_node_referrers:
161+
cmf_sonata_admin_integration.menu.extension.menu_node_referrers:
157162
implements:
158163
- Symfony\Cmf\Bundle\MenuBundle\Model\MenuNodeReferrersInterface
159-
cmf_menu.admin_extension.menu_options:
164+
cmf_sonata_admin_integration.menu.extension.menu_options:
160165
implements:
161166
- Symfony\Cmf\Bundle\MenuBundle\Model\MenuOptionsInterface
162-
cmf_routing.admin_extension.route_referrers:
167+
cmf_sonata_admin_integration.routing.extension.route_referrers:
163168
implements:
164169
- Symfony\Cmf\Component\Routing\RouteReferrersInterface
165-
cmf_routing.admin_extension.frontend_link:
170+
cmf_sonata_admin_integration.routing.extension.frontend_link:
166171
implements:
167172
- Symfony\Cmf\Component\Routing\RouteReferrersReadInterface
168173
extends:
169174
- Symfony\Component\Routing\Route
170-
cmf_seo.admin_extension:
175+
cmf_sonata_admin_integration.seo.extension.metadata:
171176
implements:
172177
- Symfony\Cmf\Bundle\SeoBundle\SeoAwareInterface
173178

@@ -183,23 +188,23 @@ sonata_admin:
183188
label: Content
184189
icon: '<i class="fa fa-file-text-o"></i>'
185190
items:
186-
- cmf_content.admin
187-
- cmf_block.simple_admin
188-
- cmf_block.container_admin
189-
- cmf_block.reference_admin
190-
- cmf_block.action_admin
191+
- cmf_sonata_admin_integration.content.admin
192+
- cmf_sonata_admin_integration.block.simple_admin
193+
- cmf_sonata_admin_integration.block.container_admin
194+
- cmf_sonata_admin_integration.block.reference_admin
195+
- cmf_sonata_admin_integration.block.action_admin
191196
routing:
192197
label: URLs
193198
icon: '<i class="fa fa-link"></i>'
194199
items:
195-
- cmf_routing.route_admin
196-
- cmf_routing.redirect_route_admin
200+
- cmf_sonata_admin_integration.routing.route_admin
201+
- cmf_sonata_admin_integration.routing.redirect_route_admin
197202
menu:
198203
label: Menu
199204
icon: '<i class="fa fa-bars"></i>'
200205
items:
201-
- cmf_menu.menu_admin
202-
- cmf_menu.node_admin
206+
- cmf_sonata_admin_integration.menu.menu_admin
207+
- cmf_sonata_admin_integration.menu.node_admin
203208

204209
sonata_doctrine_phpcr_admin:
205210
templates:

bin/symfony_requirements

100644100755
Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ echo '> Checking Symfony requirements:'.PHP_EOL.' ';
2222

2323
$messages = array();
2424
foreach ($symfonyRequirements->getRequirements() as $req) {
25-
/** @var $req Requirement */
2625
if ($helpText = get_error_message($req, $lineSize)) {
2726
echo_style('red', 'E');
2827
$messages['error'][] = $helpText;
@@ -121,10 +120,14 @@ function echo_block($style, $title, $message)
121120

122121
echo PHP_EOL.PHP_EOL;
123122

124-
echo_style($style, str_repeat(' ', $width).PHP_EOL);
125-
echo_style($style, str_pad(' ['.$title.']', $width, ' ', STR_PAD_RIGHT).PHP_EOL);
126-
echo_style($style, str_pad($message, $width, ' ', STR_PAD_RIGHT).PHP_EOL);
127-
echo_style($style, str_repeat(' ', $width).PHP_EOL);
123+
echo_style($style, str_repeat(' ', $width));
124+
echo PHP_EOL;
125+
echo_style($style, str_pad(' ['.$title.']', $width, ' ', STR_PAD_RIGHT));
126+
echo PHP_EOL;
127+
echo_style($style, $message);
128+
echo PHP_EOL;
129+
echo_style($style, str_repeat(' ', $width));
130+
echo PHP_EOL;
128131
}
129132

130133
function has_color_support()

composer.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"sensio/framework-extra-bundle": "^3.0.2",
2727
"incenteev/composer-parameter-handler": "^2.0",
2828

29-
"symfony-cmf/symfony-cmf": "2.0.*",
29+
"symfony-cmf/symfony-cmf": "^2.0",
3030
"symfony-cmf/seo-bundle": "2.0.*",
3131
"symfony-cmf/routing-auto-bundle": "2.0.*",
3232

@@ -39,15 +39,16 @@
3939

4040
"sonata-project/cache-bundle": "^2.1",
4141
"sonata-project/doctrine-phpcr-admin-bundle": "^2.0",
42-
"sonata-project/admin-bundle": "^3.2",
42+
"sonata-project/admin-bundle": "^3.6",
4343
"sonata-project/translation-bundle": "^2.0",
4444

4545
"jms/serializer-bundle": "^1.1",
4646
"friendsofsymfony/rest-bundle": "~1.7",
4747
"eko/feedbundle": "^1.2.7",
4848
"lunetics/locale-bundle": "^2.5",
4949
"burgov/key-value-form-bundle": "^1.4",
50-
"egeloen/ckeditor-bundle": "^4.0"
50+
"egeloen/ckeditor-bundle": "^4.0",
51+
"symfony-cmf/sonata-admin-integration-bundle": "^1.0"
5152
},
5253
"require-dev": {
5354
"sensio/generator-bundle": "^3.0",

0 commit comments

Comments
 (0)