@@ -104,7 +104,7 @@ |
||
104 | 104 | |
105 | 105 | foreach ($fullmatrix as $region => $classNames) { |
106 | 106 | foreach ($classNames as $className) { |
107 | - $placeholder = 'content_item.type.' . strtolower(str_replace(' ', '_', Str::humanize(Str::classname($className)))); |
|
107 | + $placeholder = 'content_item.type.'.strtolower(str_replace(' ', '_', Str::humanize(Str::classname($className)))); |
|
108 | 108 | $matrix[$region][$className] = $this->translator->trans($placeholder, array(), 'admin', 'nl'); |
109 | 109 | } |
110 | 110 | } |
@@ -42,7 +42,7 @@ |
||
42 | 42 | |
43 | 43 | if (!in_array($contentItem->getRegion(), $matrix->getRegions($type))) { |
44 | 44 | $this->context->addViolationAt( |
45 | - 'contentItems[' . $i . ']', |
|
45 | + 'contentItems['.$i.']', |
|
46 | 46 | $this->translator->trans( |
47 | 47 | "content_item.invalid.region.type.combination", |
48 | 48 | array( |
@@ -35,7 +35,7 @@ |
||
35 | 35 | $baseUrl = rtrim($input->getOption('base-url'), '/'); |
36 | 36 | |
37 | 37 | foreach ($pages as $page) { |
38 | - $output->writeln($baseUrl . $urlProvider->url($page)); |
|
38 | + $output->writeln($baseUrl.$urlProvider->url($page)); |
|
39 | 39 | } |
40 | 40 | } |
41 | 41 | } |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | $this->setDescription("Creates aliases for all pages") |
27 | 27 | ->setName('zicht:page:alias') |
28 | 28 | ->addArgument('entity', InputArgument::OPTIONAL, 'Only do a specific entity') |
29 | - ->addOption('where', 'w', InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Add a WHERE query') |
|
29 | + ->addOption('where', 'w', InputOption::VALUE_REQUIRED|InputOption::VALUE_IS_ARRAY, 'Add a WHERE query') |
|
30 | 30 | ->addOption('move', '', InputOption::VALUE_NONE, 'Force regeneration (use MOVE strategy for new aliases)'); |
31 | 31 | } |
32 | 32 | |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | } |
74 | 74 | $result = $aliaser->createAlias($page); |
75 | 75 | if ($output->getVerbosity() > OutputInterface::VERBOSITY_VERBOSE) { |
76 | - $output->writeln(" -> " . ($result ? '[created]' : '[already aliased]')); |
|
76 | + $output->writeln(" -> ".($result ? '[created]' : '[already aliased]')); |
|
77 | 77 | } |
78 | 78 | } |
79 | 79 | $progress->finish(); |
@@ -27,13 +27,13 @@ discard block |
||
27 | 27 | return; |
28 | 28 | } |
29 | 29 | |
30 | - $naming = function ($fqEntityClassName) { |
|
30 | + $naming = function($fqEntityClassName) { |
|
31 | 31 | return |
32 | 32 | str_replace( |
33 | 33 | '\\Entity\\', |
34 | 34 | '\\Admin\\', |
35 | 35 | $fqEntityClassName |
36 | - ) . 'Admin'; |
|
36 | + ).'Admin'; |
|
37 | 37 | }; |
38 | 38 | |
39 | 39 | $config = $container->getParameter('zicht_page.config'); |
@@ -71,14 +71,14 @@ discard block |
||
71 | 71 | $tags['sonata.admin'][0]['label'] = Str::rstrip(Str::classname($entityClassName), 'Page'); |
72 | 72 | $adminService->setTags($tags); |
73 | 73 | |
74 | - $id = $baseIds[$type]. '.' . Str::uscore(Str::classname($entityClassName)); |
|
74 | + $id = $baseIds[$type].'.'.Str::uscore(Str::classname($entityClassName)); |
|
75 | 75 | |
76 | 76 | $adminService->replaceArgument(0, $id); |
77 | 77 | $adminService->replaceArgument(1, $entityClassName); |
78 | 78 | |
79 | 79 | $container->setDefinition($id, $adminService); |
80 | 80 | |
81 | - $serviceDefs[$type][]= $id; |
|
81 | + $serviceDefs[$type][] = $id; |
|
82 | 82 | } else { |
83 | 83 | throw new \Exception(sprintf('The PageBundle was unable to create a service definition for %s because the associated class %s was not found', $entityClassName, $adminClassName)); |
84 | 84 | } |
@@ -71,7 +71,7 @@ |
||
71 | 71 | |
72 | 72 | if ($container->hasParameter('twig.form.resources')) { |
73 | 73 | $formResources = $container->getParameter('twig.form.resources'); |
74 | - $formResources[]= 'ZichtPageBundle::form_theme.html.twig'; |
|
74 | + $formResources[] = 'ZichtPageBundle::form_theme.html.twig'; |
|
75 | 75 | $container->setParameter('twig.form.resources', $formResources); |
76 | 76 | } |
77 | 77 | } |
@@ -176,14 +176,14 @@ |
||
176 | 176 | 'edit' => 'inline', |
177 | 177 | 'inline' => 'table', |
178 | 178 | 'sortable' => 'weight', |
179 | - 'admin_code' => $this->code . '|' . $this->contentItemAdminCode |
|
179 | + 'admin_code' => $this->code.'|'.$this->contentItemAdminCode |
|
180 | 180 | ) |
181 | 181 | ) |
182 | 182 | ->end()->end(); |
183 | 183 | |
184 | 184 | $formMapper->getFormBuilder()->addEventListener( |
185 | 185 | FormEvents::SUBMIT, |
186 | - function (FormEvent $e) { |
|
186 | + function(FormEvent $e) { |
|
187 | 187 | /** @var PageInterface $pageData */ |
188 | 188 | $pageData = $e->getData(); |
189 | 189 |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | { |
59 | 59 | if ($options['container']) { |
60 | 60 | $page = $options['container']; |
61 | - $choiceFilter = function ($choices) use ($page) { |
|
61 | + $choiceFilter = function($choices) use ($page) { |
|
62 | 62 | $ret = array(); |
63 | 63 | if ($page instanceof ContentItemContainer && null !== $page->getContentItemMatrix()) { |
64 | 64 | $types = $page->getContentItemMatrix()->getTypes(); |
@@ -106,8 +106,8 @@ discard block |
||
106 | 106 | |
107 | 107 | try { |
108 | 108 | if ($subject->getId() && $subject->getRegion() !== null && $typeAdmin = $this->sonata->getAdminByClass(get_class($subject))) { |
109 | - $view->vars['type']= Str::humanize(Str::classname($subject->getConvertToType())); |
|
110 | - $childAdmin = $this->sonata->getAdminByAdminCode($parentAdmin->getCode() . '|' . $typeAdmin->getCode()); |
|
109 | + $view->vars['type'] = Str::humanize(Str::classname($subject->getConvertToType())); |
|
110 | + $childAdmin = $this->sonata->getAdminByAdminCode($parentAdmin->getCode().'|'.$typeAdmin->getCode()); |
|
111 | 111 | $childAdmin->setRequest($genericAdmin->getRequest()); |
112 | 112 | |
113 | 113 | if ($subject && $subject->getId() && $subject->getPage() && $subject->getPage()->getId()) { |
@@ -80,7 +80,7 @@ |
||
80 | 80 | ->andWhere('p.title LIKE :pattern') |
81 | 81 | ->setMaxResults(30) |
82 | 82 | ->getQuery() |
83 | - ->execute(array('pattern' => '%' . $pattern . '%')); |
|
83 | + ->execute(array('pattern' => '%'.$pattern.'%')); |
|
84 | 84 | |
85 | 85 | $suggestions = array(); |
86 | 86 | foreach ($pages as $page) { |