@@ -67,7 +67,7 @@ |
||
| 67 | 67 | $admin->generateObjectUrl('edit', $e->getPage()), |
| 68 | 68 | sprintf( |
| 69 | 69 | 'Beheer pagina "%s"', |
| 70 | - strlen($title) > 20 ? substr($title, 0, 20) . '...' : $title |
|
| 70 | + strlen($title) > 20 ? substr($title, 0, 20).'...' : $title |
|
| 71 | 71 | ) |
| 72 | 72 | ) |
| 73 | 73 | ); |
@@ -43,10 +43,10 @@ |
||
| 43 | 43 | /** @var $em \Doctrine\ORM\EntityManager */ |
| 44 | 44 | $em = $this->doctrine->getManager(); |
| 45 | 45 | |
| 46 | - $choiceCallback = function (Options $options) use ($em) { |
|
| 46 | + $choiceCallback = function(Options $options) use ($em) { |
|
| 47 | 47 | $ret = array(); |
| 48 | 48 | foreach ($em->getClassMetadata($options['entity'])->discriminatorMap as $className) { |
| 49 | - $placeholder = 'content_item.type.' . strtolower(str_replace(' ', '_', Str::humanize(Str::classname($className)))); |
|
| 49 | + $placeholder = 'content_item.type.'.strtolower(str_replace(' ', '_', Str::humanize(Str::classname($className)))); |
|
| 50 | 50 | $ret[$className] = $placeholder; |
| 51 | 51 | } |
| 52 | 52 | if (is_callable($options['choice_filter'])) { |
@@ -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 ($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->getPage() && $subject->getPage()->getId()) { |
@@ -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 | } |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | 'edit' => 'inline', |
| 203 | 203 | 'inline' => 'table', |
| 204 | 204 | 'sortable' => 'weight', |
| 205 | - 'admin_code' => $this->code . '|' . $this->contentItemAdminCode |
|
| 205 | + 'admin_code' => $this->code.'|'.$this->contentItemAdminCode |
|
| 206 | 206 | ) |
| 207 | 207 | ) |
| 208 | 208 | ->end()->end() //needed to do twice, since a tab is a group surrounding a 'with' |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | |
| 211 | 211 | $formMapper->getFormBuilder()->addEventListener( |
| 212 | 212 | FormEvents::SUBMIT, |
| 213 | - function (FormEvent $e) { |
|
| 213 | + function(FormEvent $e) { |
|
| 214 | 214 | /** @var PageInterface $pageData */ |
| 215 | 215 | $pageData = $e->getData(); |
| 216 | 216 | |
@@ -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 | } |