|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/** |
|
4
|
|
|
* webtrees-lib: MyArtJaub library for webtrees |
|
5
|
|
|
* |
|
6
|
|
|
* @package MyArtJaub\Webtrees |
|
7
|
|
|
* @subpackage GeoDispersion |
|
8
|
|
|
* @author Jonathan Jaubart <[email protected]> |
|
9
|
|
|
* @copyright Copyright (c) 2021-2022, Jonathan Jaubart |
|
10
|
|
|
* @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 |
|
11
|
|
|
*/ |
|
12
|
|
|
|
|
13
|
|
|
declare(strict_types=1); |
|
14
|
|
|
|
|
15
|
|
|
namespace MyArtJaub\Webtrees\Module\GeoDispersion\Views; |
|
16
|
|
|
|
|
17
|
|
|
use Fisharebest\Webtrees\I18N; |
|
18
|
|
|
use Fisharebest\Webtrees\Module\ModuleInterface; |
|
19
|
|
|
use MyArtJaub\Webtrees\Common\GeoDispersion\GeoAnalysis\GeoAnalysisResult; |
|
20
|
|
|
use MyArtJaub\Webtrees\Module\GeoDispersion\GeoDispersionModule; |
|
21
|
|
|
use Psr\Http\Message\ServerRequestInterface; |
|
22
|
|
|
|
|
23
|
|
|
class GeoAnalysisTable extends AbstractGeoAnalysisView |
|
24
|
|
|
{ |
|
25
|
|
|
/** |
|
26
|
|
|
* {@inheritDoc} |
|
27
|
|
|
* @see \MyArtJaub\Webtrees\Module\GeoDispersion\Views\AbstractGeoAnalysisView::type() |
|
28
|
|
|
*/ |
|
29
|
|
|
public function type(): string |
|
30
|
|
|
{ |
|
31
|
|
|
return I18N::translateContext('GEODISPERSION', 'Table'); |
|
32
|
|
|
} |
|
33
|
|
|
|
|
34
|
|
|
/** |
|
35
|
|
|
* {@inheritDoc} |
|
36
|
|
|
* @see \MyArtJaub\Webtrees\Module\GeoDispersion\Views\AbstractGeoAnalysisView::icon() |
|
37
|
|
|
*/ |
|
38
|
|
|
public function icon(ModuleInterface $module): string |
|
39
|
|
|
{ |
|
40
|
|
|
return view($module->name() . '::icons/view-table', ['type' => $this->type()]); |
|
41
|
|
|
} |
|
42
|
|
|
|
|
43
|
|
|
/** |
|
44
|
|
|
* {@inheritDoc} |
|
45
|
|
|
* @see \MyArtJaub\Webtrees\Module\GeoDispersion\Views\AbstractGeoAnalysisView::globalSettingsContent() |
|
46
|
|
|
*/ |
|
47
|
|
|
public function globalSettingsContent(ModuleInterface $module): string |
|
48
|
|
|
{ |
|
49
|
|
|
return ''; |
|
50
|
|
|
} |
|
51
|
|
|
|
|
52
|
|
|
/** |
|
53
|
|
|
* {@inheritDoc} |
|
54
|
|
|
* @see \MyArtJaub\Webtrees\Module\GeoDispersion\Views\AbstractGeoAnalysisView::withGlobalSettingsUpdate() |
|
55
|
|
|
* @return $this |
|
56
|
|
|
*/ |
|
57
|
|
|
public function withGlobalSettingsUpdate(ServerRequestInterface $request): self |
|
58
|
|
|
{ |
|
59
|
|
|
return $this; |
|
60
|
|
|
} |
|
61
|
|
|
|
|
62
|
|
|
/** |
|
63
|
|
|
* {@inheritDoc} |
|
64
|
|
|
* @see \MyArtJaub\Webtrees\Module\GeoDispersion\Views\AbstractGeoAnalysisView::globalTabContent() |
|
65
|
|
|
*/ |
|
66
|
|
|
public function globalTabContent(GeoDispersionModule $module, GeoAnalysisResult $result, array $params): string |
|
67
|
|
|
{ |
|
68
|
|
|
return view($module->name() . '::geoanalysisview-tab-glb-table', $params + [ |
|
69
|
|
|
'result' => $result |
|
70
|
|
|
]); |
|
71
|
|
|
} |
|
72
|
|
|
} |
|
73
|
|
|
|