@@ -65,7 +65,7 @@ |
||
| 65 | 65 | ->get('logger') |
| 66 | 66 | ->debug(sprintf( |
| 67 | 67 | '[BlastCoreBundle] Processing the configuration in this order: %s', |
| 68 | - implode(', ', $classes) |
|
| 68 | + implode(', ', $classes) |
|
| 69 | 69 | )) |
| 70 | 70 | ; |
| 71 | 71 | |
@@ -544,6 +544,9 @@ discard block |
||
| 544 | 544 | return $mapper; |
| 545 | 545 | } |
| 546 | 546 | |
| 547 | + /** |
|
| 548 | + * @param string $class |
|
| 549 | + */ |
|
| 547 | 550 | protected function configureFields($function, BaseMapper $mapper, $class = null) |
| 548 | 551 | { |
| 549 | 552 | if (!$class) { |
@@ -805,6 +808,9 @@ discard block |
||
| 805 | 808 | return $baseRoute; |
| 806 | 809 | } |
| 807 | 810 | |
| 811 | + /** |
|
| 812 | + * @param string $callbackType |
|
| 813 | + */ |
|
| 808 | 814 | protected function manageCallback($mapper, &$options, $callbackType) |
| 809 | 815 | { |
| 810 | 816 | $option = $options[$callbackType]; |
@@ -833,12 +839,18 @@ discard block |
||
| 833 | 839 | return $callBackFunction; |
| 834 | 840 | } |
| 835 | 841 | |
| 842 | + /** |
|
| 843 | + * @param BaseMapper $mapper |
|
| 844 | + */ |
|
| 836 | 845 | protected function manageQueryCallback($mapper, &$options) |
| 837 | 846 | { |
| 838 | 847 | $callback = $this->manageCallback($mapper, $options, 'query'); |
| 839 | 848 | $options['query'] = $callback; |
| 840 | 849 | } |
| 841 | 850 | |
| 851 | + /** |
|
| 852 | + * @param BaseMapper $mapper |
|
| 853 | + */ |
|
| 842 | 854 | protected function manageChoicesCallback($mapper, &$options) |
| 843 | 855 | { |
| 844 | 856 | $callback = $this->manageCallback($mapper, $options, 'choicesCallback'); |
@@ -850,6 +862,9 @@ discard block |
||
| 850 | 862 | unset($options['choicesCallback']); |
| 851 | 863 | } |
| 852 | 864 | |
| 865 | + /** |
|
| 866 | + * @param BaseMapper $mapper |
|
| 867 | + */ |
|
| 853 | 868 | public function manageServiceCallback($mapper, &$options) |
| 854 | 869 | { |
| 855 | 870 | $this->manageCallback($mapper, $options, 'serviceCallback'); |
@@ -71,11 +71,9 @@ discard block |
||
| 71 | 71 | |
| 72 | 72 | $fcts = [ |
| 73 | 73 | 'tabs' => $mapper instanceof ShowMapper ? |
| 74 | - ['getter' => 'getShowTabs', 'setter' => 'setShowTabs'] : |
|
| 75 | - ['getter' => 'getFormTabs', 'setter' => 'setFormTabs'], |
|
| 74 | + ['getter' => 'getShowTabs', 'setter' => 'setShowTabs'] : ['getter' => 'getFormTabs', 'setter' => 'setFormTabs'], |
|
| 76 | 75 | 'groups' => $mapper instanceof ShowMapper ? |
| 77 | - ['getter' => 'getShowGroups', 'setter' => 'setShowGroups'] : |
|
| 78 | - ['getter' => 'getFormGroups', 'setter' => 'setFormGroups'], |
|
| 76 | + ['getter' => 'getShowGroups', 'setter' => 'setShowGroups'] : ['getter' => 'getFormGroups', 'setter' => 'setFormGroups'], |
|
| 79 | 77 | ]; |
| 80 | 78 | |
| 81 | 79 | // Figure out if we have to display tabs on the Show view |
@@ -265,11 +263,9 @@ discard block |
||
| 265 | 263 | |
| 266 | 264 | $fcts = [ |
| 267 | 265 | 'tabs' => $mapper instanceof ShowMapper ? |
| 268 | - ['getter' => 'getShowTabs', 'setter' => 'setShowTabs'] : |
|
| 269 | - ['getter' => 'getFormTabs', 'setter' => 'setFormTabs'], |
|
| 266 | + ['getter' => 'getShowTabs', 'setter' => 'setShowTabs'] : ['getter' => 'getFormTabs', 'setter' => 'setFormTabs'], |
|
| 270 | 267 | 'groups' => $mapper instanceof ShowMapper ? |
| 271 | - ['getter' => 'getShowGroups', 'setter' => 'setShowGroups'] : |
|
| 272 | - ['getter' => 'getFormGroups', 'setter' => 'setFormGroups'], |
|
| 268 | + ['getter' => 'getShowGroups', 'setter' => 'setShowGroups'] : ['getter' => 'getFormGroups', 'setter' => 'setFormGroups'], |
|
| 273 | 269 | ]; |
| 274 | 270 | |
| 275 | 271 | // if a grouped organization can be shapped |
@@ -667,7 +663,7 @@ discard block |
||
| 667 | 663 | if (!is_array($fields) && isset($blast[$class][ListMapper::class]['add']['_export_format'][$fields])) { |
| 668 | 664 | $blast[$class][ListMapper::class]['add']['_export_format'][$format] = // the global fields array |
| 669 | 665 | $fields = // the local fields array |
| 670 | - $blast[$class][ListMapper::class]['add']['_export_format'][$fields]; // the source fields array |
|
| 666 | + $blast[$class][ListMapper::class]['add']['_export_format'][$fields]; // the source fields array |
|
| 671 | 667 | } |
| 672 | 668 | |
| 673 | 669 | // removes a specific format |
@@ -844,7 +840,7 @@ discard block |
||
| 844 | 840 | $callback = $this->manageCallback($mapper, $options, 'choicesCallback'); |
| 845 | 841 | |
| 846 | 842 | $options['choices'] = $callback; |
| 847 | - $options['choice_loader'] = new CallbackChoiceLoader(function () use ($options) { |
|
| 843 | + $options['choice_loader'] = new CallbackChoiceLoader(function() use ($options) { |
|
| 848 | 844 | return $options['choices']; |
| 849 | 845 | }); |
| 850 | 846 | unset($options['choicesCallback']); |
@@ -66,7 +66,7 @@ |
||
| 66 | 66 | |
| 67 | 67 | // Manage route pattern generation |
| 68 | 68 | $routes = $parts; |
| 69 | - array_walk($routes, function (&$item, $k) use (&$routes) { |
|
| 69 | + array_walk($routes, function(&$item, $k) use (&$routes) { |
|
| 70 | 70 | $item = preg_replace('/(admin)|(bundle)/', '', strtolower($item)); |
| 71 | 71 | if ($item == '') { |
| 72 | 72 | array_splice($routes, $k, 1); |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | |
| 36 | 36 | /** |
| 37 | 37 | * @param ModelManagerInterface $modelManager |
| 38 | - * @param array|string $skeletonDirectories |
|
| 38 | + * @param string $skeletonDirectories |
|
| 39 | 39 | */ |
| 40 | 40 | public function __construct(ModelManagerInterface $modelManager, $skeletonDirectories) |
| 41 | 41 | { |
@@ -167,6 +167,9 @@ |
||
| 167 | 167 | return $classes; |
| 168 | 168 | } |
| 169 | 169 | |
| 170 | + /** |
|
| 171 | + * @param string $function |
|
| 172 | + */ |
|
| 170 | 173 | private function fallbackConfiguration(BaseMapper $mapper, $function) |
| 171 | 174 | { |
| 172 | 175 | // fallback |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | * |
| 34 | 34 | * @param $collections array or string, describing the collections to manage |
| 35 | 35 | * |
| 36 | - * @return CoreAdmin $this |
|
| 36 | + * @return CollectionsManager $this |
|
| 37 | 37 | * */ |
| 38 | 38 | public function addManagedCollections($collections) |
| 39 | 39 | { |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | /** |
| 35 | - * @param FormMapper $mapper |
|
| 35 | + * @param ShowMapper $mapper |
|
| 36 | 36 | */ |
| 37 | 37 | public function configureShowFields(ShowMapper $mapper) |
| 38 | 38 | { |
@@ -129,7 +129,7 @@ |
||
| 129 | 129 | * |
| 130 | 130 | * @param $name string|null |
| 131 | 131 | * |
| 132 | - * @return self |
|
| 132 | + * @return boolean |
|
| 133 | 133 | **/ |
| 134 | 134 | public function hasListAction($name) |
| 135 | 135 | { |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | /** |
| 21 | 21 | * @param type $mapper |
| 22 | 22 | * |
| 23 | - * @return type |
|
| 23 | + * @return Templates |
|
| 24 | 24 | */ |
| 25 | 25 | protected function fixTemplates($mapper) |
| 26 | 26 | { |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | /** |
| 28 | 28 | * @param Request $request |
| 29 | 29 | * |
| 30 | - * @return JsonResponse|Response |
|
| 30 | + * @return \Symfony\Component\HttpFoundation\Response |
|
| 31 | 31 | * |
| 32 | 32 | * @throws \RuntimeException |
| 33 | 33 | */ |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | foreach ($pager->getResults() as $result) { |
| 53 | 53 | $results[] = array( |
| 54 | 54 | 'label' => $admin->toString($result), |
| 55 | - 'link' => $admin->generateObjectUrl('show', $result), // Sonata uses "edit", we prefer "show" |
|
| 55 | + 'link' => $admin->generateObjectUrl('show', $result), // Sonata uses "edit", we prefer "show" |
|
| 56 | 56 | 'id' => $admin->id($result), |
| 57 | 57 | ); |
| 58 | 58 | } |
@@ -78,7 +78,7 @@ |
||
| 78 | 78 | /** |
| 79 | 79 | * getQuery(). |
| 80 | 80 | * |
| 81 | - * @return Doctrine\ORM\Query |
|
| 81 | + * @return \Doctrine\ORM\Query |
|
| 82 | 82 | **/ |
| 83 | 83 | public function getQuery() |
| 84 | 84 | { |