11
11
12
12
namespace AppBundle \DataFixtures \PHPCR ;
13
13
14
- use Doctrine \ODM \PHPCR \DocumentManager ;
15
14
use Doctrine \Common \DataFixtures \FixtureInterface ;
16
15
use Doctrine \Common \DataFixtures \OrderedFixtureInterface ;
17
16
use Doctrine \Common \Persistence \ObjectManager ;
17
+ use Doctrine \ODM \PHPCR \DocumentManager ;
18
18
use PHPCR \Util \NodeHelper ;
19
- use Symfony \Component \DependencyInjection \ContainerAwareTrait ;
20
- use Symfony \Component \DependencyInjection \ContainerAwareInterface ;
21
- use Symfony \Cmf \Bundle \MenuBundle \Doctrine \Phpcr \MenuNode ;
22
19
use Symfony \Cmf \Bundle \MenuBundle \Doctrine \Phpcr \Menu ;
20
+ use Symfony \Cmf \Bundle \MenuBundle \Doctrine \Phpcr \MenuNode ;
21
+ use Symfony \Component \DependencyInjection \ContainerAwareInterface ;
22
+ use Symfony \Component \DependencyInjection \ContainerAwareTrait ;
23
23
24
24
class LoadMenuData implements ContainerAwareInterface, FixtureInterface, OrderedFixtureInterface
25
25
{
@@ -48,19 +48,19 @@ public function load(ObjectManager $manager)
48
48
NodeHelper::createPath ($ session , $ basepath );
49
49
$ root = $ manager ->find (null , $ basepath );
50
50
51
- $ labels = array ( 'en ' => 'Home ' , 'de ' => 'Start ' , 'fr ' => 'Accueil ' ) ;
51
+ $ labels = [ 'en ' => 'Home ' , 'de ' => 'Start ' , 'fr ' => 'Accueil ' ] ;
52
52
/** @var $main Menu */
53
53
$ main = $ this ->createMenuNode ($ manager , $ root , 'main ' , $ labels , $ manager ->find (null , "$ content_path/home " ));
54
- $ main ->setChildrenAttributes (array ( 'class ' => 'menu_main ' ) );
54
+ $ main ->setChildrenAttributes ([ 'class ' => 'menu_main ' ] );
55
55
56
56
$ this ->createMenuNode ($ manager , $ main , 'admin-item ' , 'Admin ' , null , null , 'sonata_admin_dashboard ' );
57
57
58
- $ projects = $ this ->createMenuNode ($ manager , $ main , 'projects-item ' , array ( 'en ' => 'Projects ' , 'de ' => 'Projekte ' , 'fr ' => 'Projets ' ) , $ manager ->find (null , "$ content_path/projects " ));
58
+ $ projects = $ this ->createMenuNode ($ manager , $ main , 'projects-item ' , [ 'en ' => 'Projects ' , 'de ' => 'Projekte ' , 'fr ' => 'Projets ' ] , $ manager ->find (null , "$ content_path/projects " ));
59
59
$ this ->createMenuNode ($ manager , $ projects , 'cmf-item ' , 'Symfony CMF ' , $ manager ->find (null , "$ content_path/cmf " ));
60
60
61
- $ company = $ this ->createMenuNode ($ manager , $ main , 'company-item ' , array ( 'en ' => 'Company ' , 'de ' => 'Firma ' , 'fr ' => 'Entreprise ' ) , $ manager ->find (null , "$ content_path/company " ));
62
- $ this ->createMenuNode ($ manager , $ company , 'team-item ' , array ( 'en ' => 'Team ' , 'de ' => 'Team ' , 'fr ' => 'Equipe ' ) , $ manager ->find (null , "$ content_path/team " ));
63
- $ this ->createMenuNode ($ manager , $ company , 'more-item ' , array ( 'en ' => 'More ' , 'de ' => 'Mehr ' , 'fr ' => 'Plus ' ) , $ manager ->find (null , "$ content_path/more " ));
61
+ $ company = $ this ->createMenuNode ($ manager , $ main , 'company-item ' , [ 'en ' => 'Company ' , 'de ' => 'Firma ' , 'fr ' => 'Entreprise ' ] , $ manager ->find (null , "$ content_path/company " ));
62
+ $ this ->createMenuNode ($ manager , $ company , 'team-item ' , [ 'en ' => 'Team ' , 'de ' => 'Team ' , 'fr ' => 'Equipe ' ] , $ manager ->find (null , "$ content_path/team " ));
63
+ $ this ->createMenuNode ($ manager , $ company , 'more-item ' , [ 'en ' => 'More ' , 'de ' => 'Mehr ' , 'fr ' => 'Plus ' ] , $ manager ->find (null , "$ content_path/more " ));
64
64
65
65
$ this ->createMenuNode ($ manager , $ main , 'about ' , 'About us ' , $ manager ->find (null , "$ content_path/about " ));
66
66
$ this ->createMenuNode ($ manager , $ main , 'contact ' , 'Contact ' , $ manager ->find (null , "$ content_path/contact " ));
@@ -78,15 +78,15 @@ public function load(ObjectManager $manager)
78
78
$ this ->createMenuNode ($ manager , $ publicationDemo , 'not-published ' , 'Not published ' , $ manager ->find (null , "$ content_path/not_published " ));
79
79
$ this ->createMenuNode ($ manager , $ publicationDemo , 'published-tomorrow ' , 'Published tomorrow ' , $ manager ->find (null , "$ content_path/published_tomorrow " ));
80
80
81
- $ singlelocale = $ this ->createMenuNode ($ manager , $ main , 'singlelocale-item ' , array ( 'en ' => 'singlelocale ' ) , $ manager ->find (null , "$ content_path/singlelocale " ));
82
- $ this ->createMenuNode ($ manager , $ singlelocale , 'singlelocale-sub-item ' , array ( 'en ' => 'singlelocale child ' ) , $ manager ->find (null , "$ content_path/singlelocale " ));
81
+ $ singlelocale = $ this ->createMenuNode ($ manager , $ main , 'singlelocale-item ' , [ 'en ' => 'singlelocale ' ] , $ manager ->find (null , "$ content_path/singlelocale " ));
82
+ $ this ->createMenuNode ($ manager , $ singlelocale , 'singlelocale-sub-item ' , [ 'en ' => 'singlelocale child ' ] , $ manager ->find (null , "$ content_path/singlelocale " ));
83
83
84
84
$ seo = $ this ->createMenuNode ($ manager , $ main , 'seo ' , 'SEO ' , $ manager ->find (null , "$ content_path/simple-seo-example " ));
85
- $ this ->createMenuNode ($ manager , $ seo , 'simple-seo-example ' , array ( 'en ' => 'Seo-Simple-Content ' ) , $ manager ->find (null , "$ content_path/simple-seo-example " ));
86
- $ this ->createMenuNode ($ manager , $ seo , 'demo-seo-extractor ' , array ( 'en ' => 'Seo-Extractor ' ) , $ manager ->find (null , "$ content_path/demo-seo-extractor " ));
87
- $ this ->createMenuNode ($ manager , $ seo , 'simple-seo-property ' , array ( 'en ' => 'Seo-Extra-Properties ' ) , $ manager ->find (null , "$ content_path/simple-seo-property " ));
85
+ $ this ->createMenuNode ($ manager , $ seo , 'simple-seo-example ' , [ 'en ' => 'Seo-Simple-Content ' ] , $ manager ->find (null , "$ content_path/simple-seo-example " ));
86
+ $ this ->createMenuNode ($ manager , $ seo , 'demo-seo-extractor ' , [ 'en ' => 'Seo-Extractor ' ] , $ manager ->find (null , "$ content_path/demo-seo-extractor " ));
87
+ $ this ->createMenuNode ($ manager , $ seo , 'simple-seo-property ' , [ 'en ' => 'Seo-Extra-Properties ' ] , $ manager ->find (null , "$ content_path/simple-seo-property " ));
88
88
89
- $ this ->createMenuNode ($ manager , $ main , 'routing-auto-item ' , array ( 'en ' => 'Auto routing example ' , 'de ' => 'Auto routing beispiel ' , 'fr ' => 'Auto routing exemple ' ) , $ manager ->find (null , "$ content_path/news/RoutingAutoBundle generates routes! " ));
89
+ $ this ->createMenuNode ($ manager , $ main , 'routing-auto-item ' , [ 'en ' => 'Auto routing example ' , 'de ' => 'Auto routing beispiel ' , 'fr ' => 'Auto routing exemple ' ] , $ manager ->find (null , "$ content_path/news/RoutingAutoBundle generates routes! " ));
90
90
91
91
$ manager ->flush ();
92
92
}
0 commit comments