@@ -30,67 +30,67 @@ |
||
30 | 30 | */ |
31 | 31 | class GeoAnalysisViewStatusAction implements RequestHandlerInterface |
32 | 32 | { |
33 | - private ?GeoDispersionModule $module; |
|
34 | - private GeoAnalysisViewDataService $geoview_data_service; |
|
33 | + private ?GeoDispersionModule $module; |
|
34 | + private GeoAnalysisViewDataService $geoview_data_service; |
|
35 | 35 | |
36 | - /** |
|
37 | - * Constructor for GeoAnalysisViewStatusAction Request Handler |
|
38 | - * |
|
39 | - * @param ModuleService $module_service |
|
40 | - * @param GeoAnalysisViewDataService $geoview_data_service |
|
41 | - */ |
|
42 | - public function __construct(ModuleService $module_service, GeoAnalysisViewDataService $geoview_data_service) |
|
43 | - { |
|
44 | - $this->module = $module_service->findByInterface(GeoDispersionModule::class)->first(); |
|
45 | - $this->geoview_data_service = $geoview_data_service; |
|
46 | - } |
|
36 | + /** |
|
37 | + * Constructor for GeoAnalysisViewStatusAction Request Handler |
|
38 | + * |
|
39 | + * @param ModuleService $module_service |
|
40 | + * @param GeoAnalysisViewDataService $geoview_data_service |
|
41 | + */ |
|
42 | + public function __construct(ModuleService $module_service, GeoAnalysisViewDataService $geoview_data_service) |
|
43 | + { |
|
44 | + $this->module = $module_service->findByInterface(GeoDispersionModule::class)->first(); |
|
45 | + $this->geoview_data_service = $geoview_data_service; |
|
46 | + } |
|
47 | 47 | |
48 | - /** |
|
49 | - * {@inheritDoc} |
|
50 | - * @see \Psr\Http\Server\RequestHandlerInterface::handle() |
|
51 | - */ |
|
52 | - public function handle(ServerRequestInterface $request): ResponseInterface |
|
53 | - { |
|
54 | - $tree = $request->getAttribute('tree'); |
|
55 | - assert($tree instanceof Tree); |
|
48 | + /** |
|
49 | + * {@inheritDoc} |
|
50 | + * @see \Psr\Http\Server\RequestHandlerInterface::handle() |
|
51 | + */ |
|
52 | + public function handle(ServerRequestInterface $request): ResponseInterface |
|
53 | + { |
|
54 | + $tree = $request->getAttribute('tree'); |
|
55 | + assert($tree instanceof Tree); |
|
56 | 56 | |
57 | - $admin_config_route = route(AdminConfigPage::class, ['tree' => $tree->name()]); |
|
57 | + $admin_config_route = route(AdminConfigPage::class, ['tree' => $tree->name()]); |
|
58 | 58 | |
59 | - if ($this->module === null) { |
|
60 | - FlashMessages::addMessage( |
|
61 | - I18N::translate('The attached module could not be found.'), |
|
62 | - 'danger' |
|
63 | - ); |
|
64 | - return redirect($admin_config_route); |
|
65 | - } |
|
59 | + if ($this->module === null) { |
|
60 | + FlashMessages::addMessage( |
|
61 | + I18N::translate('The attached module could not be found.'), |
|
62 | + 'danger' |
|
63 | + ); |
|
64 | + return redirect($admin_config_route); |
|
65 | + } |
|
66 | 66 | |
67 | - $view_id = (int) $request->getAttribute('view_id'); |
|
68 | - $view = $this->geoview_data_service->find($tree, $view_id, true); |
|
67 | + $view_id = (int) $request->getAttribute('view_id'); |
|
68 | + $view = $this->geoview_data_service->find($tree, $view_id, true); |
|
69 | 69 | |
70 | - if ($view === null) { |
|
71 | - FlashMessages::addMessage( |
|
72 | - I18N::translate('The view with ID “%d” does not exist.', I18N::number($view_id)), |
|
73 | - 'danger' |
|
74 | - ); |
|
75 | - return redirect($admin_config_route); |
|
76 | - } |
|
70 | + if ($view === null) { |
|
71 | + FlashMessages::addMessage( |
|
72 | + I18N::translate('The view with ID “%d” does not exist.', I18N::number($view_id)), |
|
73 | + 'danger' |
|
74 | + ); |
|
75 | + return redirect($admin_config_route); |
|
76 | + } |
|
77 | 77 | |
78 | - if ($this->geoview_data_service->updateStatus($view, (bool) $request->getAttribute('enable', false)) > 0) { |
|
79 | - FlashMessages::addMessage( |
|
80 | - I18N::translate('The geographical dispersion analysis view has been successfully updated'), |
|
81 | - 'success' |
|
82 | - ); |
|
83 | - //phpcs:ignore Generic.Files.LineLength.TooLong |
|
84 | - Log::addConfigurationLog('Module ' . $this->module->title() . ' : View “' . $view->id() . '” has been updated.'); |
|
85 | - } else { |
|
86 | - FlashMessages::addMessage( |
|
87 | - I18N::translate('An error occured while updating the geographical dispersion analysis view'), |
|
88 | - 'danger' |
|
89 | - ); |
|
90 | - //phpcs:ignore Generic.Files.LineLength.TooLong |
|
91 | - Log::addConfigurationLog('Module ' . $this->module->title() . ' : View “' . $view->id() . '” could not be updated. See error log.'); |
|
92 | - } |
|
78 | + if ($this->geoview_data_service->updateStatus($view, (bool) $request->getAttribute('enable', false)) > 0) { |
|
79 | + FlashMessages::addMessage( |
|
80 | + I18N::translate('The geographical dispersion analysis view has been successfully updated'), |
|
81 | + 'success' |
|
82 | + ); |
|
83 | + //phpcs:ignore Generic.Files.LineLength.TooLong |
|
84 | + Log::addConfigurationLog('Module ' . $this->module->title() . ' : View “' . $view->id() . '” has been updated.'); |
|
85 | + } else { |
|
86 | + FlashMessages::addMessage( |
|
87 | + I18N::translate('An error occured while updating the geographical dispersion analysis view'), |
|
88 | + 'danger' |
|
89 | + ); |
|
90 | + //phpcs:ignore Generic.Files.LineLength.TooLong |
|
91 | + Log::addConfigurationLog('Module ' . $this->module->title() . ' : View “' . $view->id() . '” could not be updated. See error log.'); |
|
92 | + } |
|
93 | 93 | |
94 | - return redirect($admin_config_route); |
|
95 | - } |
|
94 | + return redirect($admin_config_route); |
|
95 | + } |
|
96 | 96 | } |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | return redirect($admin_config_route); |
65 | 65 | } |
66 | 66 | |
67 | - $view_id = (int) $request->getAttribute('view_id'); |
|
67 | + $view_id = (int)$request->getAttribute('view_id'); |
|
68 | 68 | $view = $this->geoview_data_service->find($tree, $view_id, true); |
69 | 69 | |
70 | 70 | if ($view === null) { |
@@ -75,20 +75,20 @@ discard block |
||
75 | 75 | return redirect($admin_config_route); |
76 | 76 | } |
77 | 77 | |
78 | - if ($this->geoview_data_service->updateStatus($view, (bool) $request->getAttribute('enable', false)) > 0) { |
|
78 | + if ($this->geoview_data_service->updateStatus($view, (bool)$request->getAttribute('enable', false)) > 0) { |
|
79 | 79 | FlashMessages::addMessage( |
80 | 80 | I18N::translate('The geographical dispersion analysis view has been successfully updated'), |
81 | 81 | 'success' |
82 | 82 | ); |
83 | 83 | //phpcs:ignore Generic.Files.LineLength.TooLong |
84 | - Log::addConfigurationLog('Module ' . $this->module->title() . ' : View “' . $view->id() . '” has been updated.'); |
|
84 | + Log::addConfigurationLog('Module '.$this->module->title().' : View “'.$view->id().'” has been updated.'); |
|
85 | 85 | } else { |
86 | 86 | FlashMessages::addMessage( |
87 | 87 | I18N::translate('An error occured while updating the geographical dispersion analysis view'), |
88 | 88 | 'danger' |
89 | 89 | ); |
90 | 90 | //phpcs:ignore Generic.Files.LineLength.TooLong |
91 | - Log::addConfigurationLog('Module ' . $this->module->title() . ' : View “' . $view->id() . '” could not be updated. See error log.'); |
|
91 | + Log::addConfigurationLog('Module '.$this->module->title().' : View “'.$view->id().'” could not be updated. See error log.'); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | return redirect($admin_config_route); |
@@ -36,98 +36,98 @@ |
||
36 | 36 | */ |
37 | 37 | class MapAdapterAddAction implements RequestHandlerInterface |
38 | 38 | { |
39 | - private ?GeoDispersionModule $module; |
|
40 | - private GeoAnalysisViewDataService $geoview_data_service; |
|
41 | - private MapAdapterDataService $mapadapter_data_service; |
|
42 | - private MapDefinitionsService $map_definition_service; |
|
39 | + private ?GeoDispersionModule $module; |
|
40 | + private GeoAnalysisViewDataService $geoview_data_service; |
|
41 | + private MapAdapterDataService $mapadapter_data_service; |
|
42 | + private MapDefinitionsService $map_definition_service; |
|
43 | 43 | |
44 | - /** |
|
45 | - * Constructor for MapAdapterAddAction Request Handler |
|
46 | - * |
|
47 | - * @param ModuleService $module_service |
|
48 | - * @param GeoAnalysisViewDataService $geoview_data_service |
|
49 | - * @param MapAdapterDataService $mapadapter_data_service |
|
50 | - * @param MapDefinitionsService $map_definition_service |
|
51 | - */ |
|
52 | - public function __construct( |
|
53 | - ModuleService $module_service, |
|
54 | - GeoAnalysisViewDataService $geoview_data_service, |
|
55 | - MapAdapterDataService $mapadapter_data_service, |
|
56 | - MapDefinitionsService $map_definition_service |
|
57 | - ) { |
|
58 | - $this->module = $module_service->findByInterface(GeoDispersionModule::class)->first(); |
|
59 | - $this->geoview_data_service = $geoview_data_service; |
|
60 | - $this->mapadapter_data_service = $mapadapter_data_service; |
|
61 | - $this->map_definition_service = $map_definition_service; |
|
62 | - } |
|
44 | + /** |
|
45 | + * Constructor for MapAdapterAddAction Request Handler |
|
46 | + * |
|
47 | + * @param ModuleService $module_service |
|
48 | + * @param GeoAnalysisViewDataService $geoview_data_service |
|
49 | + * @param MapAdapterDataService $mapadapter_data_service |
|
50 | + * @param MapDefinitionsService $map_definition_service |
|
51 | + */ |
|
52 | + public function __construct( |
|
53 | + ModuleService $module_service, |
|
54 | + GeoAnalysisViewDataService $geoview_data_service, |
|
55 | + MapAdapterDataService $mapadapter_data_service, |
|
56 | + MapDefinitionsService $map_definition_service |
|
57 | + ) { |
|
58 | + $this->module = $module_service->findByInterface(GeoDispersionModule::class)->first(); |
|
59 | + $this->geoview_data_service = $geoview_data_service; |
|
60 | + $this->mapadapter_data_service = $mapadapter_data_service; |
|
61 | + $this->map_definition_service = $map_definition_service; |
|
62 | + } |
|
63 | 63 | |
64 | - /** |
|
65 | - * {@inheritDoc} |
|
66 | - * @see \Psr\Http\Server\RequestHandlerInterface::handle() |
|
67 | - */ |
|
68 | - public function handle(ServerRequestInterface $request): ResponseInterface |
|
69 | - { |
|
70 | - $tree = $request->getAttribute('tree'); |
|
71 | - assert($tree instanceof Tree); |
|
64 | + /** |
|
65 | + * {@inheritDoc} |
|
66 | + * @see \Psr\Http\Server\RequestHandlerInterface::handle() |
|
67 | + */ |
|
68 | + public function handle(ServerRequestInterface $request): ResponseInterface |
|
69 | + { |
|
70 | + $tree = $request->getAttribute('tree'); |
|
71 | + assert($tree instanceof Tree); |
|
72 | 72 | |
73 | - if ($this->module === null) { |
|
74 | - FlashMessages::addMessage( |
|
75 | - I18N::translate('The attached module could not be found.'), |
|
76 | - 'danger' |
|
77 | - ); |
|
78 | - return redirect(route(AdminConfigPage::class, ['tree' => $tree])); |
|
79 | - } |
|
73 | + if ($this->module === null) { |
|
74 | + FlashMessages::addMessage( |
|
75 | + I18N::translate('The attached module could not be found.'), |
|
76 | + 'danger' |
|
77 | + ); |
|
78 | + return redirect(route(AdminConfigPage::class, ['tree' => $tree])); |
|
79 | + } |
|
80 | 80 | |
81 | - $view_id = (int) $request->getAttribute('view_id'); |
|
82 | - $view = $this->geoview_data_service->find($tree, $view_id); |
|
81 | + $view_id = (int) $request->getAttribute('view_id'); |
|
82 | + $view = $this->geoview_data_service->find($tree, $view_id); |
|
83 | 83 | |
84 | - $params = (array) $request->getParsedBody(); |
|
84 | + $params = (array) $request->getParsedBody(); |
|
85 | 85 | |
86 | - $map = $this->map_definition_service->find($params['map_adapter_map'] ?? ''); |
|
87 | - $mapping_property = $params['map_adapter_property_selected'] ?? ''; |
|
86 | + $map = $this->map_definition_service->find($params['map_adapter_map'] ?? ''); |
|
87 | + $mapping_property = $params['map_adapter_property_selected'] ?? ''; |
|
88 | 88 | |
89 | - $mapper = null; |
|
90 | - try { |
|
91 | - $mapper = app($params['map_adapter_mapper'] ?? ''); |
|
92 | - } catch (BindingResolutionException $ex) { |
|
93 | - } |
|
89 | + $mapper = null; |
|
90 | + try { |
|
91 | + $mapper = app($params['map_adapter_mapper'] ?? ''); |
|
92 | + } catch (BindingResolutionException $ex) { |
|
93 | + } |
|
94 | 94 | |
95 | - if ($view === null || $map === null || $mapper === null || !($mapper instanceof PlaceMapperInterface)) { |
|
96 | - FlashMessages::addMessage( |
|
97 | - I18N::translate('The parameters for the map configuration are not valid.'), |
|
98 | - 'danger' |
|
99 | - ); |
|
100 | - return redirect(route(AdminConfigPage::class, ['tree' => $tree])); |
|
101 | - } |
|
95 | + if ($view === null || $map === null || $mapper === null || !($mapper instanceof PlaceMapperInterface)) { |
|
96 | + FlashMessages::addMessage( |
|
97 | + I18N::translate('The parameters for the map configuration are not valid.'), |
|
98 | + 'danger' |
|
99 | + ); |
|
100 | + return redirect(route(AdminConfigPage::class, ['tree' => $tree])); |
|
101 | + } |
|
102 | 102 | |
103 | - $new_adapter_id = $this->mapadapter_data_service->insertGetId( |
|
104 | - new GeoAnalysisMapAdapter( |
|
105 | - 0, |
|
106 | - $view_id, |
|
107 | - $map, |
|
108 | - $mapper, |
|
109 | - new MapViewConfig($mapping_property, $mapper->config()->withConfigUpdate($request)) |
|
110 | - ) |
|
111 | - ); |
|
112 | - if ($new_adapter_id > 0) { |
|
113 | - FlashMessages::addMessage( |
|
114 | - I18N::translate('The map configuration has been successfully added'), |
|
115 | - 'success' |
|
116 | - ); |
|
117 | - //phpcs:ignore Generic.Files.LineLength.TooLong |
|
118 | - Log::addConfigurationLog('Module ' . $this->module->title() . ' : Map Adapter “' . $new_adapter_id . '” has been added.'); |
|
119 | - } else { |
|
120 | - FlashMessages::addMessage( |
|
121 | - I18N::translate('An error occured while adding a new map configuration'), |
|
122 | - 'danger' |
|
123 | - ); |
|
124 | - //phpcs:ignore Generic.Files.LineLength.TooLong |
|
125 | - Log::addConfigurationLog('Module ' . $this->module->title() . ' : Map Adapter could not be added. See error log.'); |
|
126 | - } |
|
103 | + $new_adapter_id = $this->mapadapter_data_service->insertGetId( |
|
104 | + new GeoAnalysisMapAdapter( |
|
105 | + 0, |
|
106 | + $view_id, |
|
107 | + $map, |
|
108 | + $mapper, |
|
109 | + new MapViewConfig($mapping_property, $mapper->config()->withConfigUpdate($request)) |
|
110 | + ) |
|
111 | + ); |
|
112 | + if ($new_adapter_id > 0) { |
|
113 | + FlashMessages::addMessage( |
|
114 | + I18N::translate('The map configuration has been successfully added'), |
|
115 | + 'success' |
|
116 | + ); |
|
117 | + //phpcs:ignore Generic.Files.LineLength.TooLong |
|
118 | + Log::addConfigurationLog('Module ' . $this->module->title() . ' : Map Adapter “' . $new_adapter_id . '” has been added.'); |
|
119 | + } else { |
|
120 | + FlashMessages::addMessage( |
|
121 | + I18N::translate('An error occured while adding a new map configuration'), |
|
122 | + 'danger' |
|
123 | + ); |
|
124 | + //phpcs:ignore Generic.Files.LineLength.TooLong |
|
125 | + Log::addConfigurationLog('Module ' . $this->module->title() . ' : Map Adapter could not be added. See error log.'); |
|
126 | + } |
|
127 | 127 | |
128 | - return redirect(route(GeoAnalysisViewEditPage::class, [ |
|
129 | - 'tree' => $tree->name(), |
|
130 | - 'view_id' => $view_id |
|
131 | - ])); |
|
132 | - } |
|
128 | + return redirect(route(GeoAnalysisViewEditPage::class, [ |
|
129 | + 'tree' => $tree->name(), |
|
130 | + 'view_id' => $view_id |
|
131 | + ])); |
|
132 | + } |
|
133 | 133 | } |
@@ -78,13 +78,13 @@ discard block |
||
78 | 78 | return redirect(route(AdminConfigPage::class, ['tree' => $tree])); |
79 | 79 | } |
80 | 80 | |
81 | - $view_id = (int) $request->getAttribute('view_id'); |
|
81 | + $view_id = (int)$request->getAttribute('view_id'); |
|
82 | 82 | $view = $this->geoview_data_service->find($tree, $view_id); |
83 | 83 | |
84 | - $params = (array) $request->getParsedBody(); |
|
84 | + $params = (array)$request->getParsedBody(); |
|
85 | 85 | |
86 | 86 | $map = $this->map_definition_service->find($params['map_adapter_map'] ?? ''); |
87 | - $mapping_property = $params['map_adapter_property_selected'] ?? ''; |
|
87 | + $mapping_property = $params['map_adapter_property_selected'] ?? ''; |
|
88 | 88 | |
89 | 89 | $mapper = null; |
90 | 90 | try { |
@@ -115,14 +115,14 @@ discard block |
||
115 | 115 | 'success' |
116 | 116 | ); |
117 | 117 | //phpcs:ignore Generic.Files.LineLength.TooLong |
118 | - Log::addConfigurationLog('Module ' . $this->module->title() . ' : Map Adapter “' . $new_adapter_id . '” has been added.'); |
|
118 | + Log::addConfigurationLog('Module '.$this->module->title().' : Map Adapter “'.$new_adapter_id.'” has been added.'); |
|
119 | 119 | } else { |
120 | 120 | FlashMessages::addMessage( |
121 | 121 | I18N::translate('An error occured while adding a new map configuration'), |
122 | 122 | 'danger' |
123 | 123 | ); |
124 | 124 | //phpcs:ignore Generic.Files.LineLength.TooLong |
125 | - Log::addConfigurationLog('Module ' . $this->module->title() . ' : Map Adapter could not be added. See error log.'); |
|
125 | + Log::addConfigurationLog('Module '.$this->module->title().' : Map Adapter could not be added. See error log.'); |
|
126 | 126 | } |
127 | 127 | |
128 | 128 | return redirect(route(GeoAnalysisViewEditPage::class, [ |
@@ -30,67 +30,67 @@ |
||
30 | 30 | */ |
31 | 31 | class GeoAnalysisViewDeleteAction implements RequestHandlerInterface |
32 | 32 | { |
33 | - private ?GeoDispersionModule $module; |
|
34 | - private GeoAnalysisViewDataService $geoview_data_service; |
|
33 | + private ?GeoDispersionModule $module; |
|
34 | + private GeoAnalysisViewDataService $geoview_data_service; |
|
35 | 35 | |
36 | - /** |
|
37 | - * Constructor for GeoAnalysisViewDeleteAction Request Handler |
|
38 | - * |
|
39 | - * @param ModuleService $module_service |
|
40 | - * @param GeoAnalysisViewDataService $geoview_data_service |
|
41 | - */ |
|
42 | - public function __construct(ModuleService $module_service, GeoAnalysisViewDataService $geoview_data_service) |
|
43 | - { |
|
44 | - $this->module = $module_service->findByInterface(GeoDispersionModule::class)->first(); |
|
45 | - $this->geoview_data_service = $geoview_data_service; |
|
46 | - } |
|
36 | + /** |
|
37 | + * Constructor for GeoAnalysisViewDeleteAction Request Handler |
|
38 | + * |
|
39 | + * @param ModuleService $module_service |
|
40 | + * @param GeoAnalysisViewDataService $geoview_data_service |
|
41 | + */ |
|
42 | + public function __construct(ModuleService $module_service, GeoAnalysisViewDataService $geoview_data_service) |
|
43 | + { |
|
44 | + $this->module = $module_service->findByInterface(GeoDispersionModule::class)->first(); |
|
45 | + $this->geoview_data_service = $geoview_data_service; |
|
46 | + } |
|
47 | 47 | |
48 | - /** |
|
49 | - * {@inheritDoc} |
|
50 | - * @see \Psr\Http\Server\RequestHandlerInterface::handle() |
|
51 | - */ |
|
52 | - public function handle(ServerRequestInterface $request): ResponseInterface |
|
53 | - { |
|
54 | - $tree = $request->getAttribute('tree'); |
|
55 | - assert($tree instanceof Tree); |
|
48 | + /** |
|
49 | + * {@inheritDoc} |
|
50 | + * @see \Psr\Http\Server\RequestHandlerInterface::handle() |
|
51 | + */ |
|
52 | + public function handle(ServerRequestInterface $request): ResponseInterface |
|
53 | + { |
|
54 | + $tree = $request->getAttribute('tree'); |
|
55 | + assert($tree instanceof Tree); |
|
56 | 56 | |
57 | - $admin_config_route = route(AdminConfigPage::class, ['tree' => $tree->name()]); |
|
57 | + $admin_config_route = route(AdminConfigPage::class, ['tree' => $tree->name()]); |
|
58 | 58 | |
59 | - if ($this->module === null) { |
|
60 | - FlashMessages::addMessage( |
|
61 | - I18N::translate('The attached module could not be found.'), |
|
62 | - 'danger' |
|
63 | - ); |
|
64 | - return redirect($admin_config_route); |
|
65 | - } |
|
59 | + if ($this->module === null) { |
|
60 | + FlashMessages::addMessage( |
|
61 | + I18N::translate('The attached module could not be found.'), |
|
62 | + 'danger' |
|
63 | + ); |
|
64 | + return redirect($admin_config_route); |
|
65 | + } |
|
66 | 66 | |
67 | - $view_id = (int) $request->getAttribute('view_id'); |
|
68 | - $view = $this->geoview_data_service->find($tree, $view_id, true); |
|
67 | + $view_id = (int) $request->getAttribute('view_id'); |
|
68 | + $view = $this->geoview_data_service->find($tree, $view_id, true); |
|
69 | 69 | |
70 | - if ($view === null) { |
|
71 | - FlashMessages::addMessage( |
|
72 | - I18N::translate('The view with ID “%d” does not exist.', I18N::number($view_id)), |
|
73 | - 'danger' |
|
74 | - ); |
|
75 | - return redirect($admin_config_route); |
|
76 | - } |
|
70 | + if ($view === null) { |
|
71 | + FlashMessages::addMessage( |
|
72 | + I18N::translate('The view with ID “%d” does not exist.', I18N::number($view_id)), |
|
73 | + 'danger' |
|
74 | + ); |
|
75 | + return redirect($admin_config_route); |
|
76 | + } |
|
77 | 77 | |
78 | - if ($this->geoview_data_service->delete($view) > 0) { |
|
79 | - FlashMessages::addMessage( |
|
80 | - I18N::translate('The geographical dispersion analysis view has been successfully deleted'), |
|
81 | - 'success' |
|
82 | - ); |
|
83 | - //phpcs:ignore Generic.Files.LineLength.TooLong |
|
84 | - Log::addConfigurationLog('Module ' . $this->module->title() . ' : View “' . $view->id() . '” has been deleted.'); |
|
85 | - } else { |
|
86 | - FlashMessages::addMessage( |
|
87 | - I18N::translate('An error occured while deleting the geographical dispersion analysis view'), |
|
88 | - 'danger' |
|
89 | - ); |
|
90 | - //phpcs:ignore Generic.Files.LineLength.TooLong |
|
91 | - Log::addConfigurationLog('Module ' . $this->module->title() . ' : View “' . $view->id() . '” could not be deleted. See error log.'); |
|
92 | - } |
|
78 | + if ($this->geoview_data_service->delete($view) > 0) { |
|
79 | + FlashMessages::addMessage( |
|
80 | + I18N::translate('The geographical dispersion analysis view has been successfully deleted'), |
|
81 | + 'success' |
|
82 | + ); |
|
83 | + //phpcs:ignore Generic.Files.LineLength.TooLong |
|
84 | + Log::addConfigurationLog('Module ' . $this->module->title() . ' : View “' . $view->id() . '” has been deleted.'); |
|
85 | + } else { |
|
86 | + FlashMessages::addMessage( |
|
87 | + I18N::translate('An error occured while deleting the geographical dispersion analysis view'), |
|
88 | + 'danger' |
|
89 | + ); |
|
90 | + //phpcs:ignore Generic.Files.LineLength.TooLong |
|
91 | + Log::addConfigurationLog('Module ' . $this->module->title() . ' : View “' . $view->id() . '” could not be deleted. See error log.'); |
|
92 | + } |
|
93 | 93 | |
94 | - return redirect($admin_config_route); |
|
95 | - } |
|
94 | + return redirect($admin_config_route); |
|
95 | + } |
|
96 | 96 | } |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | return redirect($admin_config_route); |
65 | 65 | } |
66 | 66 | |
67 | - $view_id = (int) $request->getAttribute('view_id'); |
|
67 | + $view_id = (int)$request->getAttribute('view_id'); |
|
68 | 68 | $view = $this->geoview_data_service->find($tree, $view_id, true); |
69 | 69 | |
70 | 70 | if ($view === null) { |
@@ -81,14 +81,14 @@ discard block |
||
81 | 81 | 'success' |
82 | 82 | ); |
83 | 83 | //phpcs:ignore Generic.Files.LineLength.TooLong |
84 | - Log::addConfigurationLog('Module ' . $this->module->title() . ' : View “' . $view->id() . '” has been deleted.'); |
|
84 | + Log::addConfigurationLog('Module '.$this->module->title().' : View “'.$view->id().'” has been deleted.'); |
|
85 | 85 | } else { |
86 | 86 | FlashMessages::addMessage( |
87 | 87 | I18N::translate('An error occured while deleting the geographical dispersion analysis view'), |
88 | 88 | 'danger' |
89 | 89 | ); |
90 | 90 | //phpcs:ignore Generic.Files.LineLength.TooLong |
91 | - Log::addConfigurationLog('Module ' . $this->module->title() . ' : View “' . $view->id() . '” could not be deleted. See error log.'); |
|
91 | + Log::addConfigurationLog('Module '.$this->module->title().' : View “'.$view->id().'” could not be deleted. See error log.'); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | return redirect($admin_config_route); |
@@ -30,69 +30,69 @@ |
||
30 | 30 | */ |
31 | 31 | class MapAdapterDeleteAction implements RequestHandlerInterface |
32 | 32 | { |
33 | - private ?GeoDispersionModule $module; |
|
34 | - private MapAdapterDataService $mapadapter_data_service; |
|
33 | + private ?GeoDispersionModule $module; |
|
34 | + private MapAdapterDataService $mapadapter_data_service; |
|
35 | 35 | |
36 | - /** |
|
37 | - * Constructor for MapAdapterDeleteAction Request Handler |
|
38 | - * |
|
39 | - * @param ModuleService $module_service |
|
40 | - * @param MapAdapterDataService $mapadapter_data_service |
|
41 | - */ |
|
42 | - public function __construct(ModuleService $module_service, MapAdapterDataService $mapadapter_data_service) |
|
43 | - { |
|
44 | - $this->module = $module_service->findByInterface(GeoDispersionModule::class)->first(); |
|
45 | - $this->mapadapter_data_service = $mapadapter_data_service; |
|
46 | - } |
|
36 | + /** |
|
37 | + * Constructor for MapAdapterDeleteAction Request Handler |
|
38 | + * |
|
39 | + * @param ModuleService $module_service |
|
40 | + * @param MapAdapterDataService $mapadapter_data_service |
|
41 | + */ |
|
42 | + public function __construct(ModuleService $module_service, MapAdapterDataService $mapadapter_data_service) |
|
43 | + { |
|
44 | + $this->module = $module_service->findByInterface(GeoDispersionModule::class)->first(); |
|
45 | + $this->mapadapter_data_service = $mapadapter_data_service; |
|
46 | + } |
|
47 | 47 | |
48 | - /** |
|
49 | - * {@inheritDoc} |
|
50 | - * @see \Psr\Http\Server\RequestHandlerInterface::handle() |
|
51 | - */ |
|
52 | - public function handle(ServerRequestInterface $request): ResponseInterface |
|
53 | - { |
|
54 | - $tree = $request->getAttribute('tree'); |
|
55 | - assert($tree instanceof Tree); |
|
48 | + /** |
|
49 | + * {@inheritDoc} |
|
50 | + * @see \Psr\Http\Server\RequestHandlerInterface::handle() |
|
51 | + */ |
|
52 | + public function handle(ServerRequestInterface $request): ResponseInterface |
|
53 | + { |
|
54 | + $tree = $request->getAttribute('tree'); |
|
55 | + assert($tree instanceof Tree); |
|
56 | 56 | |
57 | - $admin_config_route = route(AdminConfigPage::class, ['tree' => $tree->name()]); |
|
57 | + $admin_config_route = route(AdminConfigPage::class, ['tree' => $tree->name()]); |
|
58 | 58 | |
59 | - if ($this->module === null) { |
|
60 | - FlashMessages::addMessage( |
|
61 | - I18N::translate('The attached module could not be found.'), |
|
62 | - 'danger' |
|
63 | - ); |
|
64 | - return redirect($admin_config_route); |
|
65 | - } |
|
66 | - $adapter_id = (int) $request->getAttribute('adapter_id'); |
|
67 | - $map_adapter = $this->mapadapter_data_service->find($adapter_id); |
|
59 | + if ($this->module === null) { |
|
60 | + FlashMessages::addMessage( |
|
61 | + I18N::translate('The attached module could not be found.'), |
|
62 | + 'danger' |
|
63 | + ); |
|
64 | + return redirect($admin_config_route); |
|
65 | + } |
|
66 | + $adapter_id = (int) $request->getAttribute('adapter_id'); |
|
67 | + $map_adapter = $this->mapadapter_data_service->find($adapter_id); |
|
68 | 68 | |
69 | - if ($map_adapter === null) { |
|
70 | - FlashMessages::addMessage( |
|
71 | - I18N::translate('The map configuration with ID “%d” does not exist.', I18N::number($adapter_id)), |
|
72 | - 'danger' |
|
73 | - ); |
|
74 | - return redirect($admin_config_route); |
|
75 | - } |
|
69 | + if ($map_adapter === null) { |
|
70 | + FlashMessages::addMessage( |
|
71 | + I18N::translate('The map configuration with ID “%d” does not exist.', I18N::number($adapter_id)), |
|
72 | + 'danger' |
|
73 | + ); |
|
74 | + return redirect($admin_config_route); |
|
75 | + } |
|
76 | 76 | |
77 | - if ($this->mapadapter_data_service->delete($map_adapter) > 0) { |
|
78 | - FlashMessages::addMessage( |
|
79 | - I18N::translate('The map configuration has been successfully deleted'), |
|
80 | - 'success' |
|
81 | - ); |
|
82 | - //phpcs:ignore Generic.Files.LineLength.TooLong |
|
83 | - Log::addConfigurationLog('Module ' . $this->module->title() . ' : Map Adapter “' . $map_adapter->id() . '” has been deleted.'); |
|
84 | - } else { |
|
85 | - FlashMessages::addMessage( |
|
86 | - I18N::translate('An error occured while deleting the map configuration'), |
|
87 | - 'danger' |
|
88 | - ); |
|
89 | - //phpcs:ignore Generic.Files.LineLength.TooLong |
|
90 | - Log::addConfigurationLog('Module ' . $this->module->title() . ' : Map Adapter “' . $map_adapter->id() . '” could not be deleted. See error log.'); |
|
91 | - } |
|
77 | + if ($this->mapadapter_data_service->delete($map_adapter) > 0) { |
|
78 | + FlashMessages::addMessage( |
|
79 | + I18N::translate('The map configuration has been successfully deleted'), |
|
80 | + 'success' |
|
81 | + ); |
|
82 | + //phpcs:ignore Generic.Files.LineLength.TooLong |
|
83 | + Log::addConfigurationLog('Module ' . $this->module->title() . ' : Map Adapter “' . $map_adapter->id() . '” has been deleted.'); |
|
84 | + } else { |
|
85 | + FlashMessages::addMessage( |
|
86 | + I18N::translate('An error occured while deleting the map configuration'), |
|
87 | + 'danger' |
|
88 | + ); |
|
89 | + //phpcs:ignore Generic.Files.LineLength.TooLong |
|
90 | + Log::addConfigurationLog('Module ' . $this->module->title() . ' : Map Adapter “' . $map_adapter->id() . '” could not be deleted. See error log.'); |
|
91 | + } |
|
92 | 92 | |
93 | - return redirect(route(GeoAnalysisViewEditPage::class, [ |
|
94 | - 'tree' => $tree->name(), |
|
95 | - 'view_id' => $map_adapter->geoAnalysisViewId() |
|
96 | - ])); |
|
97 | - } |
|
93 | + return redirect(route(GeoAnalysisViewEditPage::class, [ |
|
94 | + 'tree' => $tree->name(), |
|
95 | + 'view_id' => $map_adapter->geoAnalysisViewId() |
|
96 | + ])); |
|
97 | + } |
|
98 | 98 | } |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | ); |
64 | 64 | return redirect($admin_config_route); |
65 | 65 | } |
66 | - $adapter_id = (int) $request->getAttribute('adapter_id'); |
|
66 | + $adapter_id = (int)$request->getAttribute('adapter_id'); |
|
67 | 67 | $map_adapter = $this->mapadapter_data_service->find($adapter_id); |
68 | 68 | |
69 | 69 | if ($map_adapter === null) { |
@@ -80,14 +80,14 @@ discard block |
||
80 | 80 | 'success' |
81 | 81 | ); |
82 | 82 | //phpcs:ignore Generic.Files.LineLength.TooLong |
83 | - Log::addConfigurationLog('Module ' . $this->module->title() . ' : Map Adapter “' . $map_adapter->id() . '” has been deleted.'); |
|
83 | + Log::addConfigurationLog('Module '.$this->module->title().' : Map Adapter “'.$map_adapter->id().'” has been deleted.'); |
|
84 | 84 | } else { |
85 | 85 | FlashMessages::addMessage( |
86 | 86 | I18N::translate('An error occured while deleting the map configuration'), |
87 | 87 | 'danger' |
88 | 88 | ); |
89 | 89 | //phpcs:ignore Generic.Files.LineLength.TooLong |
90 | - Log::addConfigurationLog('Module ' . $this->module->title() . ' : Map Adapter “' . $map_adapter->id() . '” could not be deleted. See error log.'); |
|
90 | + Log::addConfigurationLog('Module '.$this->module->title().' : Map Adapter “'.$map_adapter->id().'” could not be deleted. See error log.'); |
|
91 | 91 | } |
92 | 92 | |
93 | 93 | return redirect(route(GeoAnalysisViewEditPage::class, [ |
@@ -32,68 +32,68 @@ |
||
32 | 32 | */ |
33 | 33 | class MapAdapterAddPage implements RequestHandlerInterface |
34 | 34 | { |
35 | - use ViewResponseTrait; |
|
35 | + use ViewResponseTrait; |
|
36 | 36 | |
37 | - private ?GeoDispersionModule $module; |
|
38 | - private GeoAnalysisViewDataService $geoview_data_service; |
|
39 | - private MapDefinitionsService $map_definition_service; |
|
40 | - private PlaceMapperService $place_mapper_service; |
|
37 | + private ?GeoDispersionModule $module; |
|
38 | + private GeoAnalysisViewDataService $geoview_data_service; |
|
39 | + private MapDefinitionsService $map_definition_service; |
|
40 | + private PlaceMapperService $place_mapper_service; |
|
41 | 41 | |
42 | - /** |
|
43 | - * Constructor for MapAdapterAddPage Request Handler |
|
44 | - * |
|
45 | - * @param ModuleService $module_service |
|
46 | - * @param GeoAnalysisViewDataService $geoview_data_service |
|
47 | - * @param MapDefinitionsService $map_definition_service |
|
48 | - * @param PlaceMapperService $place_mapper_service |
|
49 | - */ |
|
50 | - public function __construct( |
|
51 | - ModuleService $module_service, |
|
52 | - GeoAnalysisViewDataService $geoview_data_service, |
|
53 | - MapDefinitionsService $map_definition_service, |
|
54 | - PlaceMapperService $place_mapper_service |
|
55 | - ) { |
|
56 | - $this->module = $module_service->findByInterface(GeoDispersionModule::class)->first(); |
|
57 | - $this->geoview_data_service = $geoview_data_service; |
|
58 | - $this->map_definition_service = $map_definition_service; |
|
59 | - $this->place_mapper_service = $place_mapper_service; |
|
60 | - } |
|
42 | + /** |
|
43 | + * Constructor for MapAdapterAddPage Request Handler |
|
44 | + * |
|
45 | + * @param ModuleService $module_service |
|
46 | + * @param GeoAnalysisViewDataService $geoview_data_service |
|
47 | + * @param MapDefinitionsService $map_definition_service |
|
48 | + * @param PlaceMapperService $place_mapper_service |
|
49 | + */ |
|
50 | + public function __construct( |
|
51 | + ModuleService $module_service, |
|
52 | + GeoAnalysisViewDataService $geoview_data_service, |
|
53 | + MapDefinitionsService $map_definition_service, |
|
54 | + PlaceMapperService $place_mapper_service |
|
55 | + ) { |
|
56 | + $this->module = $module_service->findByInterface(GeoDispersionModule::class)->first(); |
|
57 | + $this->geoview_data_service = $geoview_data_service; |
|
58 | + $this->map_definition_service = $map_definition_service; |
|
59 | + $this->place_mapper_service = $place_mapper_service; |
|
60 | + } |
|
61 | 61 | |
62 | - /** |
|
63 | - * {@inheritDoc} |
|
64 | - * @see \Psr\Http\Server\RequestHandlerInterface::handle() |
|
65 | - */ |
|
66 | - public function handle(ServerRequestInterface $request): ResponseInterface |
|
67 | - { |
|
68 | - $this->layout = 'layouts/administration'; |
|
62 | + /** |
|
63 | + * {@inheritDoc} |
|
64 | + * @see \Psr\Http\Server\RequestHandlerInterface::handle() |
|
65 | + */ |
|
66 | + public function handle(ServerRequestInterface $request): ResponseInterface |
|
67 | + { |
|
68 | + $this->layout = 'layouts/administration'; |
|
69 | 69 | |
70 | - if ($this->module === null) { |
|
71 | - throw new HttpNotFoundException(I18N::translate('The attached module could not be found.')); |
|
72 | - } |
|
73 | - $tree = $request->getAttribute('tree'); |
|
74 | - assert($tree instanceof Tree); |
|
70 | + if ($this->module === null) { |
|
71 | + throw new HttpNotFoundException(I18N::translate('The attached module could not be found.')); |
|
72 | + } |
|
73 | + $tree = $request->getAttribute('tree'); |
|
74 | + assert($tree instanceof Tree); |
|
75 | 75 | |
76 | - $view_id = (int) $request->getAttribute('view_id'); |
|
77 | - $view = $this->geoview_data_service->find($tree, $view_id, true); |
|
76 | + $view_id = (int) $request->getAttribute('view_id'); |
|
77 | + $view = $this->geoview_data_service->find($tree, $view_id, true); |
|
78 | 78 | |
79 | - if ($view === null) { |
|
80 | - throw new HttpNotFoundException( |
|
81 | - I18N::translate('The geographical dispersion analysis view could not be found.') |
|
82 | - ); |
|
83 | - } |
|
79 | + if ($view === null) { |
|
80 | + throw new HttpNotFoundException( |
|
81 | + I18N::translate('The geographical dispersion analysis view could not be found.') |
|
82 | + ); |
|
83 | + } |
|
84 | 84 | |
85 | - return $this->viewResponse($this->module->name() . '::admin/map-adapter-edit', [ |
|
86 | - 'module' => $this->module, |
|
87 | - 'title' => I18N::translate('Add a map configuration'), |
|
88 | - 'tree' => $tree, |
|
89 | - 'view_id' => $view_id, |
|
90 | - 'map_adapter' => null, |
|
91 | - 'maps_list' => $this->map_definition_service->all(), |
|
92 | - 'mappers_list' => $this->place_mapper_service->all(), |
|
93 | - 'route_edit' => route(MapAdapterAddAction::class, [ |
|
94 | - 'tree' => $tree->name(), |
|
95 | - 'view_id' => $view_id |
|
96 | - ]) |
|
97 | - ]); |
|
98 | - } |
|
85 | + return $this->viewResponse($this->module->name() . '::admin/map-adapter-edit', [ |
|
86 | + 'module' => $this->module, |
|
87 | + 'title' => I18N::translate('Add a map configuration'), |
|
88 | + 'tree' => $tree, |
|
89 | + 'view_id' => $view_id, |
|
90 | + 'map_adapter' => null, |
|
91 | + 'maps_list' => $this->map_definition_service->all(), |
|
92 | + 'mappers_list' => $this->place_mapper_service->all(), |
|
93 | + 'route_edit' => route(MapAdapterAddAction::class, [ |
|
94 | + 'tree' => $tree->name(), |
|
95 | + 'view_id' => $view_id |
|
96 | + ]) |
|
97 | + ]); |
|
98 | + } |
|
99 | 99 | } |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | $tree = $request->getAttribute('tree'); |
74 | 74 | assert($tree instanceof Tree); |
75 | 75 | |
76 | - $view_id = (int) $request->getAttribute('view_id'); |
|
76 | + $view_id = (int)$request->getAttribute('view_id'); |
|
77 | 77 | $view = $this->geoview_data_service->find($tree, $view_id, true); |
78 | 78 | |
79 | 79 | if ($view === null) { |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | ); |
83 | 83 | } |
84 | 84 | |
85 | - return $this->viewResponse($this->module->name() . '::admin/map-adapter-edit', [ |
|
85 | + return $this->viewResponse($this->module->name().'::admin/map-adapter-edit', [ |
|
86 | 86 | 'module' => $this->module, |
87 | 87 | 'title' => I18N::translate('Add a map configuration'), |
88 | 88 | 'tree' => $tree, |
@@ -32,79 +32,79 @@ |
||
32 | 32 | */ |
33 | 33 | class GeoAnalysisViewListData implements RequestHandlerInterface |
34 | 34 | { |
35 | - private ?GeoDispersionModule $module; |
|
36 | - private GeoAnalysisViewDataService $geoview_data_service; |
|
37 | - private DatatablesService $datatables_service; |
|
35 | + private ?GeoDispersionModule $module; |
|
36 | + private GeoAnalysisViewDataService $geoview_data_service; |
|
37 | + private DatatablesService $datatables_service; |
|
38 | 38 | |
39 | - /** |
|
40 | - * Constructor for GeoAnalysisViewListData Request Handler |
|
41 | - * |
|
42 | - * @param ModuleService $module_service |
|
43 | - * @param GeoAnalysisViewDataService $geoview_data_service |
|
44 | - * @param DatatablesService $datatables_service |
|
45 | - */ |
|
46 | - public function __construct( |
|
47 | - ModuleService $module_service, |
|
48 | - GeoAnalysisViewDataService $geoview_data_service, |
|
49 | - DatatablesService $datatables_service |
|
50 | - ) { |
|
51 | - $this->module = $module_service->findByInterface(GeoDispersionModule::class)->first(); |
|
52 | - $this->geoview_data_service = $geoview_data_service; |
|
53 | - $this->datatables_service = $datatables_service; |
|
54 | - } |
|
39 | + /** |
|
40 | + * Constructor for GeoAnalysisViewListData Request Handler |
|
41 | + * |
|
42 | + * @param ModuleService $module_service |
|
43 | + * @param GeoAnalysisViewDataService $geoview_data_service |
|
44 | + * @param DatatablesService $datatables_service |
|
45 | + */ |
|
46 | + public function __construct( |
|
47 | + ModuleService $module_service, |
|
48 | + GeoAnalysisViewDataService $geoview_data_service, |
|
49 | + DatatablesService $datatables_service |
|
50 | + ) { |
|
51 | + $this->module = $module_service->findByInterface(GeoDispersionModule::class)->first(); |
|
52 | + $this->geoview_data_service = $geoview_data_service; |
|
53 | + $this->datatables_service = $datatables_service; |
|
54 | + } |
|
55 | 55 | |
56 | - /** |
|
57 | - * {@inheritDoc} |
|
58 | - * @see \Psr\Http\Server\RequestHandlerInterface::handle() |
|
59 | - */ |
|
60 | - public function handle(ServerRequestInterface $request): ResponseInterface |
|
61 | - { |
|
62 | - if ($this->module === null) { |
|
63 | - throw new HttpNotFoundException(I18N::translate('The attached module could not be found.')); |
|
64 | - } |
|
56 | + /** |
|
57 | + * {@inheritDoc} |
|
58 | + * @see \Psr\Http\Server\RequestHandlerInterface::handle() |
|
59 | + */ |
|
60 | + public function handle(ServerRequestInterface $request): ResponseInterface |
|
61 | + { |
|
62 | + if ($this->module === null) { |
|
63 | + throw new HttpNotFoundException(I18N::translate('The attached module could not be found.')); |
|
64 | + } |
|
65 | 65 | |
66 | - $tree = $request->getAttribute('tree'); |
|
67 | - assert($tree instanceof Tree); |
|
66 | + $tree = $request->getAttribute('tree'); |
|
67 | + assert($tree instanceof Tree); |
|
68 | 68 | |
69 | - $module = $this->module; |
|
70 | - $module_name = $this->module->name(); |
|
71 | - return response(['data' => $this->geoview_data_service->all($tree, true) |
|
72 | - ->map(fn(AbstractGeoAnalysisView $view) => [ |
|
73 | - "edit" => view($module_name . '::admin/view-table-options', [ |
|
74 | - 'view_id' => $view->id(), |
|
75 | - 'view_enabled' => $view->isEnabled(), |
|
76 | - 'view_edit_route' => route(GeoAnalysisViewEditPage::class, [ |
|
77 | - 'tree' => $tree->name(), |
|
78 | - 'view_id' => $view->id() |
|
79 | - ]), |
|
80 | - 'view_delete_route' => route(GeoAnalysisViewDeleteAction::class, [ |
|
81 | - 'tree' => $tree->name(), |
|
82 | - 'view_id' => $view->id() |
|
83 | - ]), |
|
84 | - 'view_status_route' => route(GeoAnalysisViewStatusAction::class, [ |
|
85 | - 'tree' => $tree->name(), |
|
86 | - 'view_id' => $view->id(), |
|
87 | - 'enable' => $view->isEnabled() ? 0 : 1 |
|
88 | - ]), |
|
89 | - ]), |
|
90 | - "enabled" => [ |
|
91 | - 'display' => view($module_name . '::components/yes-no-icons', ['yes' => $view->isEnabled()]), |
|
92 | - 'raw' => $view->isEnabled() ? 0 : 1 |
|
93 | - ], |
|
94 | - "type" => $view->icon($module), |
|
95 | - "description" => [ |
|
96 | - 'display' => '<span dir="auto">' . e($view->description()) . '</span>', |
|
97 | - 'raw' => e($view->description()) |
|
98 | - ], |
|
99 | - "analysis" => [ |
|
100 | - 'display' => '<span dir="auto">' . e($view->analysis()->title()) . '</span>', |
|
101 | - 'raw' => e($view->analysis()->title()) |
|
102 | - ], |
|
103 | - "place_depth" => [ |
|
104 | - 'display' => I18N::number($view->placesDepth()), |
|
105 | - 'raw' => $view->placesDepth() |
|
106 | - ] |
|
107 | - ]) |
|
108 | - ]); |
|
109 | - } |
|
69 | + $module = $this->module; |
|
70 | + $module_name = $this->module->name(); |
|
71 | + return response(['data' => $this->geoview_data_service->all($tree, true) |
|
72 | + ->map(fn(AbstractGeoAnalysisView $view) => [ |
|
73 | + "edit" => view($module_name . '::admin/view-table-options', [ |
|
74 | + 'view_id' => $view->id(), |
|
75 | + 'view_enabled' => $view->isEnabled(), |
|
76 | + 'view_edit_route' => route(GeoAnalysisViewEditPage::class, [ |
|
77 | + 'tree' => $tree->name(), |
|
78 | + 'view_id' => $view->id() |
|
79 | + ]), |
|
80 | + 'view_delete_route' => route(GeoAnalysisViewDeleteAction::class, [ |
|
81 | + 'tree' => $tree->name(), |
|
82 | + 'view_id' => $view->id() |
|
83 | + ]), |
|
84 | + 'view_status_route' => route(GeoAnalysisViewStatusAction::class, [ |
|
85 | + 'tree' => $tree->name(), |
|
86 | + 'view_id' => $view->id(), |
|
87 | + 'enable' => $view->isEnabled() ? 0 : 1 |
|
88 | + ]), |
|
89 | + ]), |
|
90 | + "enabled" => [ |
|
91 | + 'display' => view($module_name . '::components/yes-no-icons', ['yes' => $view->isEnabled()]), |
|
92 | + 'raw' => $view->isEnabled() ? 0 : 1 |
|
93 | + ], |
|
94 | + "type" => $view->icon($module), |
|
95 | + "description" => [ |
|
96 | + 'display' => '<span dir="auto">' . e($view->description()) . '</span>', |
|
97 | + 'raw' => e($view->description()) |
|
98 | + ], |
|
99 | + "analysis" => [ |
|
100 | + 'display' => '<span dir="auto">' . e($view->analysis()->title()) . '</span>', |
|
101 | + 'raw' => e($view->analysis()->title()) |
|
102 | + ], |
|
103 | + "place_depth" => [ |
|
104 | + 'display' => I18N::number($view->placesDepth()), |
|
105 | + 'raw' => $view->placesDepth() |
|
106 | + ] |
|
107 | + ]) |
|
108 | + ]); |
|
109 | + } |
|
110 | 110 | } |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | $module_name = $this->module->name(); |
71 | 71 | return response(['data' => $this->geoview_data_service->all($tree, true) |
72 | 72 | ->map(fn(AbstractGeoAnalysisView $view) => [ |
73 | - "edit" => view($module_name . '::admin/view-table-options', [ |
|
73 | + "edit" => view($module_name.'::admin/view-table-options', [ |
|
74 | 74 | 'view_id' => $view->id(), |
75 | 75 | 'view_enabled' => $view->isEnabled(), |
76 | 76 | 'view_edit_route' => route(GeoAnalysisViewEditPage::class, [ |
@@ -88,16 +88,16 @@ discard block |
||
88 | 88 | ]), |
89 | 89 | ]), |
90 | 90 | "enabled" => [ |
91 | - 'display' => view($module_name . '::components/yes-no-icons', ['yes' => $view->isEnabled()]), |
|
91 | + 'display' => view($module_name.'::components/yes-no-icons', ['yes' => $view->isEnabled()]), |
|
92 | 92 | 'raw' => $view->isEnabled() ? 0 : 1 |
93 | 93 | ], |
94 | 94 | "type" => $view->icon($module), |
95 | 95 | "description" => [ |
96 | - 'display' => '<span dir="auto">' . e($view->description()) . '</span>', |
|
96 | + 'display' => '<span dir="auto">'.e($view->description()).'</span>', |
|
97 | 97 | 'raw' => e($view->description()) |
98 | 98 | ], |
99 | 99 | "analysis" => [ |
100 | - 'display' => '<span dir="auto">' . e($view->analysis()->title()) . '</span>', |
|
100 | + 'display' => '<span dir="auto">'.e($view->analysis()->title()).'</span>', |
|
101 | 101 | 'raw' => e($view->analysis()->title()) |
102 | 102 | ], |
103 | 103 | "place_depth" => [ |
@@ -29,44 +29,44 @@ |
||
29 | 29 | */ |
30 | 30 | class MapFeaturePropertyData implements RequestHandlerInterface |
31 | 31 | { |
32 | - private MapDefinitionsService $map_definition_service; |
|
32 | + private MapDefinitionsService $map_definition_service; |
|
33 | 33 | |
34 | - /** |
|
35 | - * Constructor for MapFeaturePropertyData Request Handler |
|
36 | - * |
|
37 | - * @param MapDefinitionsService $map_definition_service |
|
38 | - */ |
|
39 | - public function __construct( |
|
40 | - MapDefinitionsService $map_definition_service |
|
41 | - ) { |
|
42 | - $this->map_definition_service = $map_definition_service; |
|
43 | - } |
|
34 | + /** |
|
35 | + * Constructor for MapFeaturePropertyData Request Handler |
|
36 | + * |
|
37 | + * @param MapDefinitionsService $map_definition_service |
|
38 | + */ |
|
39 | + public function __construct( |
|
40 | + MapDefinitionsService $map_definition_service |
|
41 | + ) { |
|
42 | + $this->map_definition_service = $map_definition_service; |
|
43 | + } |
|
44 | 44 | |
45 | - /** |
|
46 | - * {@inheritDoc} |
|
47 | - * @see \Psr\Http\Server\RequestHandlerInterface::handle() |
|
48 | - */ |
|
49 | - public function handle(ServerRequestInterface $request): ResponseInterface |
|
50 | - { |
|
51 | - $map_id = $request->getQueryParams()['map_id'] ?? $request->getAttribute('map_id') ?? ''; |
|
45 | + /** |
|
46 | + * {@inheritDoc} |
|
47 | + * @see \Psr\Http\Server\RequestHandlerInterface::handle() |
|
48 | + */ |
|
49 | + public function handle(ServerRequestInterface $request): ResponseInterface |
|
50 | + { |
|
51 | + $map_id = $request->getQueryParams()['map_id'] ?? $request->getAttribute('map_id') ?? ''; |
|
52 | 52 | |
53 | - return response(Registry::cache()->file()->remember('map-properties-' . $map_id, function () use ($map_id) { |
|
54 | - $map = $this->map_definition_service->find($map_id); |
|
55 | - if ($map === null) { |
|
56 | - throw new HttpNotFoundException(I18N::translate('The map could not be found.')); |
|
57 | - } |
|
53 | + return response(Registry::cache()->file()->remember('map-properties-' . $map_id, function () use ($map_id) { |
|
54 | + $map = $this->map_definition_service->find($map_id); |
|
55 | + if ($map === null) { |
|
56 | + throw new HttpNotFoundException(I18N::translate('The map could not be found.')); |
|
57 | + } |
|
58 | 58 | |
59 | - $features = []; |
|
60 | - collect($map->features()) |
|
61 | - ->map(fn(Feature $feature): ?stdClass => $feature->getProperties()) |
|
62 | - ->filter() |
|
63 | - ->map(fn(stdClass $properties) => array_keys(get_object_vars($properties))) |
|
64 | - ->each(function (array $properties) use (&$features) { |
|
65 | - $features = count($features) === 0 ? $properties : array_intersect($features, $properties); |
|
66 | - }); |
|
59 | + $features = []; |
|
60 | + collect($map->features()) |
|
61 | + ->map(fn(Feature $feature): ?stdClass => $feature->getProperties()) |
|
62 | + ->filter() |
|
63 | + ->map(fn(stdClass $properties) => array_keys(get_object_vars($properties))) |
|
64 | + ->each(function (array $properties) use (&$features) { |
|
65 | + $features = count($features) === 0 ? $properties : array_intersect($features, $properties); |
|
66 | + }); |
|
67 | 67 | |
68 | - usort($features, I18N::comparator()); |
|
69 | - return $features; |
|
70 | - }, 86400000)); |
|
71 | - } |
|
68 | + usort($features, I18N::comparator()); |
|
69 | + return $features; |
|
70 | + }, 86400000)); |
|
71 | + } |
|
72 | 72 | } |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | { |
51 | 51 | $map_id = $request->getQueryParams()['map_id'] ?? $request->getAttribute('map_id') ?? ''; |
52 | 52 | |
53 | - return response(Registry::cache()->file()->remember('map-properties-' . $map_id, function () use ($map_id) { |
|
53 | + return response(Registry::cache()->file()->remember('map-properties-'.$map_id, function() use ($map_id) { |
|
54 | 54 | $map = $this->map_definition_service->find($map_id); |
55 | 55 | if ($map === null) { |
56 | 56 | throw new HttpNotFoundException(I18N::translate('The map could not be found.')); |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | ->map(fn(Feature $feature): ?stdClass => $feature->getProperties()) |
62 | 62 | ->filter() |
63 | 63 | ->map(fn(stdClass $properties) => array_keys(get_object_vars($properties))) |
64 | - ->each(function (array $properties) use (&$features) { |
|
64 | + ->each(function(array $properties) use (&$features) { |
|
65 | 65 | $features = count($features) === 0 ? $properties : array_intersect($features, $properties); |
66 | 66 | }); |
67 | 67 |
@@ -35,87 +35,87 @@ |
||
35 | 35 | */ |
36 | 36 | class MapAdapterEditAction implements RequestHandlerInterface |
37 | 37 | { |
38 | - private ?GeoDispersionModule $module; |
|
39 | - private MapAdapterDataService $mapadapter_data_service; |
|
40 | - private MapDefinitionsService $map_definition_service; |
|
38 | + private ?GeoDispersionModule $module; |
|
39 | + private MapAdapterDataService $mapadapter_data_service; |
|
40 | + private MapDefinitionsService $map_definition_service; |
|
41 | 41 | |
42 | - /** |
|
43 | - * Constructor for MapAdapterEditAction Request Handler |
|
44 | - * |
|
45 | - * @param ModuleService $module_service |
|
46 | - * @param MapAdapterDataService $mapadapter_data_service |
|
47 | - * @param MapDefinitionsService $map_definition_service |
|
48 | - */ |
|
49 | - public function __construct( |
|
50 | - ModuleService $module_service, |
|
51 | - MapAdapterDataService $mapadapter_data_service, |
|
52 | - MapDefinitionsService $map_definition_service |
|
53 | - ) { |
|
54 | - $this->module = $module_service->findByInterface(GeoDispersionModule::class)->first(); |
|
55 | - $this->mapadapter_data_service = $mapadapter_data_service; |
|
56 | - $this->map_definition_service = $map_definition_service; |
|
57 | - } |
|
42 | + /** |
|
43 | + * Constructor for MapAdapterEditAction Request Handler |
|
44 | + * |
|
45 | + * @param ModuleService $module_service |
|
46 | + * @param MapAdapterDataService $mapadapter_data_service |
|
47 | + * @param MapDefinitionsService $map_definition_service |
|
48 | + */ |
|
49 | + public function __construct( |
|
50 | + ModuleService $module_service, |
|
51 | + MapAdapterDataService $mapadapter_data_service, |
|
52 | + MapDefinitionsService $map_definition_service |
|
53 | + ) { |
|
54 | + $this->module = $module_service->findByInterface(GeoDispersionModule::class)->first(); |
|
55 | + $this->mapadapter_data_service = $mapadapter_data_service; |
|
56 | + $this->map_definition_service = $map_definition_service; |
|
57 | + } |
|
58 | 58 | |
59 | - /** |
|
60 | - * {@inheritDoc} |
|
61 | - * @see \Psr\Http\Server\RequestHandlerInterface::handle() |
|
62 | - */ |
|
63 | - public function handle(ServerRequestInterface $request): ResponseInterface |
|
64 | - { |
|
65 | - $tree = $request->getAttribute('tree'); |
|
66 | - assert($tree instanceof Tree); |
|
59 | + /** |
|
60 | + * {@inheritDoc} |
|
61 | + * @see \Psr\Http\Server\RequestHandlerInterface::handle() |
|
62 | + */ |
|
63 | + public function handle(ServerRequestInterface $request): ResponseInterface |
|
64 | + { |
|
65 | + $tree = $request->getAttribute('tree'); |
|
66 | + assert($tree instanceof Tree); |
|
67 | 67 | |
68 | - if ($this->module === null) { |
|
69 | - FlashMessages::addMessage( |
|
70 | - I18N::translate('The attached module could not be found.'), |
|
71 | - 'danger' |
|
72 | - ); |
|
73 | - return redirect(route(AdminConfigPage::class, ['tree' => $tree])); |
|
74 | - } |
|
68 | + if ($this->module === null) { |
|
69 | + FlashMessages::addMessage( |
|
70 | + I18N::translate('The attached module could not be found.'), |
|
71 | + 'danger' |
|
72 | + ); |
|
73 | + return redirect(route(AdminConfigPage::class, ['tree' => $tree])); |
|
74 | + } |
|
75 | 75 | |
76 | - $adapter_id = (int) $request->getAttribute('adapter_id'); |
|
77 | - $map_adapter = $this->mapadapter_data_service->find($adapter_id); |
|
76 | + $adapter_id = (int) $request->getAttribute('adapter_id'); |
|
77 | + $map_adapter = $this->mapadapter_data_service->find($adapter_id); |
|
78 | 78 | |
79 | - $params = (array) $request->getParsedBody(); |
|
79 | + $params = (array) $request->getParsedBody(); |
|
80 | 80 | |
81 | - $map = $this->map_definition_service->find($params['map_adapter_map'] ?? ''); |
|
82 | - $mapping_property = $params['map_adapter_property_selected'] ?? ''; |
|
81 | + $map = $this->map_definition_service->find($params['map_adapter_map'] ?? ''); |
|
82 | + $mapping_property = $params['map_adapter_property_selected'] ?? ''; |
|
83 | 83 | |
84 | - $mapper = null; |
|
85 | - try { |
|
86 | - $mapper = app($params['map_adapter_mapper'] ?? ''); |
|
87 | - } catch (BindingResolutionException $ex) { |
|
88 | - } |
|
84 | + $mapper = null; |
|
85 | + try { |
|
86 | + $mapper = app($params['map_adapter_mapper'] ?? ''); |
|
87 | + } catch (BindingResolutionException $ex) { |
|
88 | + } |
|
89 | 89 | |
90 | - if ($map_adapter === null || $map === null || $mapper === null || !($mapper instanceof PlaceMapperInterface)) { |
|
91 | - FlashMessages::addMessage( |
|
92 | - I18N::translate('The parameters for the map configuration are not valid.'), |
|
93 | - 'danger' |
|
94 | - ); |
|
95 | - return redirect(route(AdminConfigPage::class, ['tree' => $tree])); |
|
96 | - } |
|
90 | + if ($map_adapter === null || $map === null || $mapper === null || !($mapper instanceof PlaceMapperInterface)) { |
|
91 | + FlashMessages::addMessage( |
|
92 | + I18N::translate('The parameters for the map configuration are not valid.'), |
|
93 | + 'danger' |
|
94 | + ); |
|
95 | + return redirect(route(AdminConfigPage::class, ['tree' => $tree])); |
|
96 | + } |
|
97 | 97 | |
98 | - $mapper->setConfig($mapper->config()->withConfigUpdate($request)); |
|
99 | - $new_map_adapter = $map_adapter->with($map, $mapper, $mapping_property); |
|
100 | - if ($this->mapadapter_data_service->update($new_map_adapter) > 0) { |
|
101 | - FlashMessages::addMessage( |
|
102 | - I18N::translate('The map configuration has been successfully updated'), |
|
103 | - 'success' |
|
104 | - ); |
|
105 | - //phpcs:ignore Generic.Files.LineLength.TooLong |
|
106 | - Log::addConfigurationLog('Module ' . $this->module->title() . ' : Map Adapter “' . $map_adapter->id() . '” has been updated.'); |
|
107 | - } else { |
|
108 | - FlashMessages::addMessage( |
|
109 | - I18N::translate('An error occured while updating the map configuration'), |
|
110 | - 'danger' |
|
111 | - ); |
|
112 | - //phpcs:ignore Generic.Files.LineLength.TooLong |
|
113 | - Log::addConfigurationLog('Module ' . $this->module->title() . ' : Map Adapter “' . $map_adapter->id() . '” could not be updated. See error log.'); |
|
114 | - } |
|
98 | + $mapper->setConfig($mapper->config()->withConfigUpdate($request)); |
|
99 | + $new_map_adapter = $map_adapter->with($map, $mapper, $mapping_property); |
|
100 | + if ($this->mapadapter_data_service->update($new_map_adapter) > 0) { |
|
101 | + FlashMessages::addMessage( |
|
102 | + I18N::translate('The map configuration has been successfully updated'), |
|
103 | + 'success' |
|
104 | + ); |
|
105 | + //phpcs:ignore Generic.Files.LineLength.TooLong |
|
106 | + Log::addConfigurationLog('Module ' . $this->module->title() . ' : Map Adapter “' . $map_adapter->id() . '” has been updated.'); |
|
107 | + } else { |
|
108 | + FlashMessages::addMessage( |
|
109 | + I18N::translate('An error occured while updating the map configuration'), |
|
110 | + 'danger' |
|
111 | + ); |
|
112 | + //phpcs:ignore Generic.Files.LineLength.TooLong |
|
113 | + Log::addConfigurationLog('Module ' . $this->module->title() . ' : Map Adapter “' . $map_adapter->id() . '” could not be updated. See error log.'); |
|
114 | + } |
|
115 | 115 | |
116 | - return redirect(route(GeoAnalysisViewEditPage::class, [ |
|
117 | - 'tree' => $tree->name(), |
|
118 | - 'view_id' => $map_adapter->geoAnalysisViewId() |
|
119 | - ])); |
|
120 | - } |
|
116 | + return redirect(route(GeoAnalysisViewEditPage::class, [ |
|
117 | + 'tree' => $tree->name(), |
|
118 | + 'view_id' => $map_adapter->geoAnalysisViewId() |
|
119 | + ])); |
|
120 | + } |
|
121 | 121 | } |
@@ -73,13 +73,13 @@ discard block |
||
73 | 73 | return redirect(route(AdminConfigPage::class, ['tree' => $tree])); |
74 | 74 | } |
75 | 75 | |
76 | - $adapter_id = (int) $request->getAttribute('adapter_id'); |
|
76 | + $adapter_id = (int)$request->getAttribute('adapter_id'); |
|
77 | 77 | $map_adapter = $this->mapadapter_data_service->find($adapter_id); |
78 | 78 | |
79 | - $params = (array) $request->getParsedBody(); |
|
79 | + $params = (array)$request->getParsedBody(); |
|
80 | 80 | |
81 | 81 | $map = $this->map_definition_service->find($params['map_adapter_map'] ?? ''); |
82 | - $mapping_property = $params['map_adapter_property_selected'] ?? ''; |
|
82 | + $mapping_property = $params['map_adapter_property_selected'] ?? ''; |
|
83 | 83 | |
84 | 84 | $mapper = null; |
85 | 85 | try { |
@@ -103,14 +103,14 @@ discard block |
||
103 | 103 | 'success' |
104 | 104 | ); |
105 | 105 | //phpcs:ignore Generic.Files.LineLength.TooLong |
106 | - Log::addConfigurationLog('Module ' . $this->module->title() . ' : Map Adapter “' . $map_adapter->id() . '” has been updated.'); |
|
106 | + Log::addConfigurationLog('Module '.$this->module->title().' : Map Adapter “'.$map_adapter->id().'” has been updated.'); |
|
107 | 107 | } else { |
108 | 108 | FlashMessages::addMessage( |
109 | 109 | I18N::translate('An error occured while updating the map configuration'), |
110 | 110 | 'danger' |
111 | 111 | ); |
112 | 112 | //phpcs:ignore Generic.Files.LineLength.TooLong |
113 | - Log::addConfigurationLog('Module ' . $this->module->title() . ' : Map Adapter “' . $map_adapter->id() . '” could not be updated. See error log.'); |
|
113 | + Log::addConfigurationLog('Module '.$this->module->title().' : Map Adapter “'.$map_adapter->id().'” could not be updated. See error log.'); |
|
114 | 114 | } |
115 | 115 | |
116 | 116 | return redirect(route(GeoAnalysisViewEditPage::class, [ |
@@ -21,50 +21,50 @@ |
||
21 | 21 | |
22 | 22 | class GeoAnalysisTable extends AbstractGeoAnalysisView |
23 | 23 | { |
24 | - /** |
|
25 | - * {@inheritDoc} |
|
26 | - * @see \MyArtJaub\Webtrees\Module\GeoDispersion\Views\AbstractGeoAnalysisView::type() |
|
27 | - */ |
|
28 | - public function type(): string |
|
29 | - { |
|
30 | - return I18N::translateContext('GEODISPERSION', 'Table'); |
|
31 | - } |
|
24 | + /** |
|
25 | + * {@inheritDoc} |
|
26 | + * @see \MyArtJaub\Webtrees\Module\GeoDispersion\Views\AbstractGeoAnalysisView::type() |
|
27 | + */ |
|
28 | + public function type(): string |
|
29 | + { |
|
30 | + return I18N::translateContext('GEODISPERSION', 'Table'); |
|
31 | + } |
|
32 | 32 | |
33 | - /** |
|
34 | - * {@inheritDoc} |
|
35 | - * @see \MyArtJaub\Webtrees\Module\GeoDispersion\Views\AbstractGeoAnalysisView::icon() |
|
36 | - */ |
|
37 | - public function icon(ModuleInterface $module): string |
|
38 | - { |
|
39 | - return view($module->name() . '::icons/view-table', ['type' => $this->type()]); |
|
40 | - } |
|
33 | + /** |
|
34 | + * {@inheritDoc} |
|
35 | + * @see \MyArtJaub\Webtrees\Module\GeoDispersion\Views\AbstractGeoAnalysisView::icon() |
|
36 | + */ |
|
37 | + public function icon(ModuleInterface $module): string |
|
38 | + { |
|
39 | + return view($module->name() . '::icons/view-table', ['type' => $this->type()]); |
|
40 | + } |
|
41 | 41 | |
42 | - /** |
|
43 | - * {@inheritDoc} |
|
44 | - * @see \MyArtJaub\Webtrees\Module\GeoDispersion\Views\AbstractGeoAnalysisView::globalSettingsContent() |
|
45 | - */ |
|
46 | - public function globalSettingsContent(ModuleInterface $module): string |
|
47 | - { |
|
48 | - return ''; |
|
49 | - } |
|
42 | + /** |
|
43 | + * {@inheritDoc} |
|
44 | + * @see \MyArtJaub\Webtrees\Module\GeoDispersion\Views\AbstractGeoAnalysisView::globalSettingsContent() |
|
45 | + */ |
|
46 | + public function globalSettingsContent(ModuleInterface $module): string |
|
47 | + { |
|
48 | + return ''; |
|
49 | + } |
|
50 | 50 | |
51 | - /** |
|
52 | - * {@inheritDoc} |
|
53 | - * @see \MyArtJaub\Webtrees\Module\GeoDispersion\Views\AbstractGeoAnalysisView::withGlobalSettingsUpdate() |
|
54 | - */ |
|
55 | - public function withGlobalSettingsUpdate(ServerRequestInterface $request): self |
|
56 | - { |
|
57 | - return $this; |
|
58 | - } |
|
51 | + /** |
|
52 | + * {@inheritDoc} |
|
53 | + * @see \MyArtJaub\Webtrees\Module\GeoDispersion\Views\AbstractGeoAnalysisView::withGlobalSettingsUpdate() |
|
54 | + */ |
|
55 | + public function withGlobalSettingsUpdate(ServerRequestInterface $request): self |
|
56 | + { |
|
57 | + return $this; |
|
58 | + } |
|
59 | 59 | |
60 | - /** |
|
61 | - * {@inheritDoc} |
|
62 | - * @see \MyArtJaub\Webtrees\Module\GeoDispersion\Views\AbstractGeoAnalysisView::globalTabContent() |
|
63 | - */ |
|
64 | - public function globalTabContent(ModuleInterface $module, GeoAnalysisResult $result, array $params): string |
|
65 | - { |
|
66 | - return view($module->name() . '::geoanalysisview-tab-glb-table', $params + [ |
|
67 | - 'result' => $result |
|
68 | - ]); |
|
69 | - } |
|
60 | + /** |
|
61 | + * {@inheritDoc} |
|
62 | + * @see \MyArtJaub\Webtrees\Module\GeoDispersion\Views\AbstractGeoAnalysisView::globalTabContent() |
|
63 | + */ |
|
64 | + public function globalTabContent(ModuleInterface $module, GeoAnalysisResult $result, array $params): string |
|
65 | + { |
|
66 | + return view($module->name() . '::geoanalysisview-tab-glb-table', $params + [ |
|
67 | + 'result' => $result |
|
68 | + ]); |
|
69 | + } |
|
70 | 70 | } |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | */ |
37 | 37 | public function icon(ModuleInterface $module): string |
38 | 38 | { |
39 | - return view($module->name() . '::icons/view-table', ['type' => $this->type()]); |
|
39 | + return view($module->name().'::icons/view-table', ['type' => $this->type()]); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | /** |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | */ |
64 | 64 | public function globalTabContent(ModuleInterface $module, GeoAnalysisResult $result, array $params): string |
65 | 65 | { |
66 | - return view($module->name() . '::geoanalysisview-tab-glb-table', $params + [ |
|
66 | + return view($module->name().'::geoanalysisview-tab-glb-table', $params + [ |
|
67 | 67 | 'result' => $result |
68 | 68 | ]); |
69 | 69 | } |