Skip to content

Commit efb7f45

Browse files
committed
Merge remote-tracking branch 'origin/master' into orm
2 parents f5dfd9f + 41fc3a1 commit efb7f45

File tree

66 files changed

+887
-600
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+887
-600
lines changed

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
phpunit.xml
22
composer.lock
3-
/vendor
4-
Tests/Functional/config/parameters.yml
5-
Tests/Functional/app.sqlite
3+
vendor
4+
Tests/Resources/app/cache
5+
Tests/Resources/app/logs

.travis.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,8 @@ env:
1111
- SYMFONY_VERSION=dev-master
1212

1313
before_script:
14-
- composer self-update
1514
- composer require symfony/framework-bundle:${SYMFONY_VERSION} --prefer-source
16-
- cp ./Tests/Functional/config/parameters.yml.dist ./Tests/Functional/config/parameters.yml
17-
- php Tests/Functional/console doctrine:phpcr:init:dbal
18-
- php Tests/Functional/console doctrine:phpcr:repository:init
15+
- vendor/symfony-cmf/testing/bin/travis/phpcr_odm_doctrine_dbal.sh
1916

2017
script: phpunit --coverage-text
2118

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?php
2+
3+
namespace Symfony\Cmf\Bundle\RoutingBundle\Admin\Extension;
4+
5+
use Sonata\AdminBundle\Admin\AdminExtension;
6+
use Sonata\AdminBundle\Admin\AdminInterface;
7+
use Sonata\AdminBundle\Datagrid\ListMapper;
8+
use Sonata\AdminBundle\Form\FormMapper;
9+
10+
/**
11+
* Admin extension to add routes tab to content implementing the
12+
* RouteReferrersWriteInterface.
13+
*
14+
* @author David Buchmann <[email protected]>
15+
*/
16+
class RouteReferrersExtension extends AdminExtension
17+
{
18+
public function configureFormFields(FormMapper $formMapper)
19+
{
20+
$formMapper
21+
->with('form.group_routes', array(
22+
'translation_domain' => 'CmfRoutingBundle',
23+
))
24+
->add(
25+
'routes',
26+
'sonata_type_collection',
27+
array(
28+
'by_reference' => false,
29+
),
30+
array(
31+
'edit' => 'inline',
32+
'inline' => 'table',
33+
))
34+
->end()
35+
;
36+
}
37+
}

Admin/RedirectRouteAdmin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class RedirectRouteAdmin extends Admin
1414
/**
1515
* work around https://github.com/sonata-project/SonataAdminBundle/pull/1472
1616
*/
17-
protected $baseRouteName = 'cmf_routing';
17+
protected $baseRouteName = 'cmf_routing_redirectroute';
1818

1919
/**
2020
* work around https://github.com/sonata-project/SonataAdminBundle/pull/1472

Admin/RouteAdmin.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class RouteAdmin extends Admin
1818
/**
1919
* work around https://github.com/sonata-project/SonataAdminBundle/pull/1472
2020
*/
21-
protected $baseRouteName = 'cmf_routing';
21+
protected $baseRouteName = 'cmf_routing_route';
2222

2323
/**
2424
* work around https://github.com/sonata-project/SonataAdminBundle/pull/1472
@@ -71,7 +71,7 @@ protected function configureFormFields(FormMapper $formMapper)
7171
$formMapper
7272
->with('form.group_general')
7373
->add('variablePattern', 'text', array('required' => false))
74-
->add('routeContent', 'doctrine_phpcr_odm_tree', array('choice_list' => array(), 'required' => false, 'root_node' => $this->contentRoot))
74+
->add('content', 'doctrine_phpcr_odm_tree', array('choice_list' => array(), 'required' => false, 'root_node' => $this->contentRoot))
7575
->add('defaults', 'sonata_type_immutable_array', array('keys' => $this->configureFieldsForDefaults()))
7676
->end();
7777
}

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Changelog
33

44
* **2013-07-29**: [DependencyInjection] restructured `phpcr_provider` config into `persistence` -> `phpcr` to match other Bundles
55
* **2013-07-28**: [DependencyInjection] added `enabled` flag to `phpcr_provider` config
6-
* **2013-07-26**: [Model] Deprecated setRouteContent and getRouteContent, use setContent and getContent instead.
6+
* **2013-07-26**: [Model] Removed setRouteContent and getRouteContent, use setContent and getContent instead.
77
* **2013-07-19**: [Model] Separated database agnostic, doctrine generic and
88
PHPCR-ODM specific code to prepare for Doctrine ORM support.
99
* **2013-07-17**: [FormType] Moved TermsFormType to CoreBundle and renamed it to CheckboxUrlLableFormType

DependencyInjection/CmfRoutingExtension.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function load(array $configs, ContainerBuilder $container)
3434
}
3535

3636
/* set up the chain router */
37-
$loader->load('chain_routing.xml');
37+
$loader->load('routing-chain.xml');
3838
$container->setParameter($this->getAlias() . '.replace_symfony_router', $config['chain']['replace_symfony_router']);
3939

4040
// add the routers defined in the configuration mapping
@@ -48,7 +48,7 @@ public function load(array $configs, ContainerBuilder $container)
4848

4949
public function setupFormTypes(array $config, ContainerBuilder $container, LoaderInterface $loader)
5050
{
51-
$loader->load('form_type.xml');
51+
$loader->load('form-type.xml');
5252

5353
if (isset($config['dynamic'])) {
5454
$routeTypeTypeDefinition = $container->getDefinition('cmf_routing.route_type_form_type');
@@ -84,7 +84,7 @@ private function setupDynamicRouter(array $config, ContainerBuilder $container,
8484
$container->setParameter($this->getAlias() . '.defined_templates_class', $controllerForTemplates);
8585
$container->setParameter($this->getAlias() . '.uri_filter_regexp', $config['uri_filter_regexp']);
8686

87-
$loader->load('dynamic_routing.xml');
87+
$loader->load('routing-dynamic.xml');
8888

8989
$hasProvider = false;
9090
$hasContentRepository = false;
@@ -144,7 +144,7 @@ private function setupDynamicRouter(array $config, ContainerBuilder $container,
144144

145145
public function loadPhpcrProvider($config, XmlFileLoader $loader, ContainerBuilder $container)
146146
{
147-
$loader->load('provider_phpcr.xml');
147+
$loader->load('provider-phpcr.xml');
148148

149149
$container->setParameter($this->getAlias() . '.backend_type_phpcr', true);
150150

@@ -174,7 +174,7 @@ public function loadSonataPhpcrAdmin($config, XmlFileLoader $loader, ContainerBu
174174
return;
175175
}
176176

177-
$loader->load('admin_phpcr.xml');
177+
$loader->load('admin-phpcr.xml');
178178
}
179179

180180
public function loadOrmProvider($config, XmlFileLoader $loader, ContainerBuilder $container)

Doctrine/Phpcr/RedirectRoute.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr;
44

55
use Symfony\Cmf\Bundle\RoutingBundle\Model\RedirectRoute as RedirectRouteModel;
6+
use Symfony\Cmf\Component\Routing\RouteObjectInterface;
67

78
/**
89
* {@inheritDoc}

Document/RedirectRoute.php

Lines changed: 0 additions & 17 deletions
This file was deleted.

Document/Route.php

Lines changed: 0 additions & 36 deletions
This file was deleted.

LICENSE

Lines changed: 0 additions & 23 deletions
This file was deleted.

Resources/config/admin_phpcr.xml renamed to Resources/config/admin-phpcr.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<parameter key="cmf_routing.redirect_route_admin_class">Symfony\Cmf\Bundle\RoutingBundle\Admin\RedirectRouteAdmin</parameter>
1010
<parameter key="cmf_routing.route_document_class">Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr\Route</parameter>
1111
<parameter key="cmf_routing.redirect_route_document_class">Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr\RedirectRoute</parameter>
12+
<parameter key="cmf_routing.admin_extension.route_referrers.class">Symfony\Cmf\Bundle\RoutingBundle\Admin\Extension\RouteReferrersExtension</parameter>
1213
</parameters>
1314

1415
<services>
@@ -50,5 +51,9 @@
5051
</call>
5152
</service>
5253

54+
<service id="cmf_routing.admin_extension.route_referrers" class="%cmf_routing.admin_extension.route_referrers.class%">
55+
<tag name="sonata.admin.extension"/>
56+
</service>
57+
5358
</services>
5459
</container>

Resources/config/doctrine/RedirectRoute.phpcr.xml

Lines changed: 0 additions & 11 deletions
This file was deleted.

Resources/config/doctrine/Route.phpcr.xml

Lines changed: 0 additions & 12 deletions
This file was deleted.
File renamed without changes.

Resources/meta/LICENSE

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
RoutingBundle
2+
3+
The MIT License
4+
5+
Copyright (c) 2011-2012 Symfony2 CMF
6+
7+
Permission is hereby granted, free of charge, to any person obtaining a copy
8+
of this software and associated documentation files (the "Software"), to deal
9+
in the Software without restriction, including without limitation the rights
10+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
copies of the Software, and to permit persons to whom the Software is
12+
furnished to do so, subject to the following conditions:
13+
14+
The above copyright notice and this permission notice shall be included in
15+
all copies or substantial portions of the Software.
16+
17+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23+
THE SOFTWARE.
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
3+
<file source-language="en" target-language="de" datatype="plaintext" original="CmfRoutingBundle.en.xliff">
4+
<body>
5+
<trans-unit id="dashboard.group_routing">
6+
<source>dashboard.group_routing</source>
7+
<target>Routen</target>
8+
</trans-unit>
9+
<trans-unit id="dashboard.label_routing">
10+
<source>dashboard.label_routing</source>
11+
<target>Route</target>
12+
</trans-unit>
13+
<trans-unit id="dashboard.label_redirect_routing">
14+
<source>dashboard.label_redirect_routing</source>
15+
<target>Umleitung</target>
16+
</trans-unit>
17+
<trans-unit id="breadcrumb.link_route_list">
18+
<source>breadcrumb.link_route_list</source>
19+
<target>Routen</target>
20+
</trans-unit>
21+
<trans-unit id="breadcrumb.link_route_create">
22+
<source>breadcrumb.link_route_create</source>
23+
<target>Erstellen</target>
24+
</trans-unit>
25+
<trans-unit id="breadcrumb.link_route_edit">
26+
<source>breadcrumb.link_route_edit</source>
27+
<target>Bearbeiten</target>
28+
</trans-unit>
29+
<trans-unit id="breadcrumb.link_route_delete">
30+
<source>breadcrumb.link_route_delete</source>
31+
<target>Löschen</target>
32+
</trans-unit>
33+
<trans-unit id="breadcrumb.link_redirect_route_list">
34+
<source>breadcrumb.link_redirect_route_list</source>
35+
<target>Umleitungen</target>
36+
</trans-unit>
37+
<trans-unit id="breadcrumb.link_redirect_route_create">
38+
<source>breadcrumb.link_redirect_route_create</source>
39+
<target>Erstellen</target>
40+
</trans-unit>
41+
<trans-unit id="breadcrumb.link_redirect_route_edit">
42+
<source>breadcrumb.link_redirect_route_edit</source>
43+
<target>Bearbeiten</target>
44+
</trans-unit>
45+
<trans-unit id="breadcrumb.link_redirect_route_delete">
46+
<source>breadcrumb.link_redirect_route_delete</source>
47+
<target>Löschen</target>
48+
</trans-unit>
49+
<trans-unit id="filter.label_name">
50+
<source>filter.label_name</source>
51+
<target>Name</target>
52+
</trans-unit>
53+
<trans-unit id="list.label_path">
54+
<source>list.label_path</source>
55+
<target>Pfad</target>
56+
</trans-unit>
57+
<trans-unit id="form.group_general">
58+
<source>form.group_general</source>
59+
<target>Allgemein</target>
60+
</trans-unit>
61+
<trans-unit id="form.label_parent">
62+
<source>form.label_parent</source>
63+
<target>Übergeordnet</target>
64+
</trans-unit>
65+
<trans-unit id="form.label_name">
66+
<source>form.label_name</source>
67+
<target>Letzter URL-Teil</target>
68+
</trans-unit>
69+
<trans-unit id="form.label_variable_pattern">
70+
<source>form.label_variable_pattern</source>
71+
<target>Variablenmuster</target>
72+
</trans-unit>
73+
<trans-unit id="form.label_route_content">
74+
<source>form.label_route_content</source>
75+
<target>Inhalt</target>
76+
</trans-unit>
77+
<trans-unit id="form.label_defaults">
78+
<source>form.label_defaults</source>
79+
<target>Vorgabewerte</target>
80+
</trans-unit>
81+
<trans-unit id="form.label_route_name">
82+
<source>form.label_route_name</source>
83+
<target>Name</target>
84+
</trans-unit>
85+
<trans-unit id="form.label_uri">
86+
<source>form.label_uri</source>
87+
<target>URI</target>
88+
</trans-unit>
89+
<trans-unit id="form.label_route_target">
90+
<source>form.label_route_target</source>
91+
<target>Routenziel</target>
92+
</trans-unit>
93+
<trans-unit id="form.group_routes">
94+
<source>form.group_routes</source>
95+
<target>Routen</target>
96+
</trans-unit>
97+
<trans-unit id="form.label_routes">
98+
<source>form.label_routes</source>
99+
<target>Routen</target>
100+
</trans-unit>
101+
</body>
102+
</file>
103+
</xliff>

0 commit comments

Comments
 (0)