@@ -22,51 +22,51 @@ |
||
| 22 | 22 | |
| 23 | 23 | class GeoAnalysisTable extends AbstractGeoAnalysisView |
| 24 | 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 | - } |
|
| 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 | 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 | - } |
|
| 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 | 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 | - } |
|
| 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 | 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 | - } |
|
| 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 | 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 | - } |
|
| 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 | 72 | } |
@@ -27,224 +27,224 @@ |
||
| 27 | 27 | */ |
| 28 | 28 | abstract class AbstractGeoAnalysisView |
| 29 | 29 | { |
| 30 | - private int $id; |
|
| 31 | - private Tree $tree; |
|
| 32 | - private bool $enabled; |
|
| 33 | - private string $description; |
|
| 34 | - private GeoAnalysisInterface $geoanalysis; |
|
| 35 | - private int $depth; |
|
| 36 | - private int $detailed_top_places; |
|
| 37 | - private bool $use_flags; |
|
| 38 | - |
|
| 39 | - /** |
|
| 40 | - * Constructor for AbstractGeoAnalysisView |
|
| 41 | - * |
|
| 42 | - * @param int $id |
|
| 43 | - * @param Tree $tree |
|
| 44 | - * @param bool $enabled |
|
| 45 | - * @param string $description |
|
| 46 | - * @param GeoAnalysisInterface $geoanalysis |
|
| 47 | - * @param int $depth |
|
| 48 | - * @param int $detailed_top_places |
|
| 49 | - * @param bool $use_flags |
|
| 50 | - */ |
|
| 51 | - final public function __construct( |
|
| 52 | - int $id, |
|
| 53 | - Tree $tree, |
|
| 54 | - bool $enabled, |
|
| 55 | - string $description, |
|
| 56 | - GeoAnalysisInterface $geoanalysis, |
|
| 57 | - int $depth, |
|
| 58 | - int $detailed_top_places = 0, |
|
| 59 | - bool $use_flags = false |
|
| 60 | - ) { |
|
| 61 | - $this->id = $id; |
|
| 62 | - $this->tree = $tree; |
|
| 63 | - $this->enabled = $enabled; |
|
| 64 | - $this->description = $description; |
|
| 65 | - $this->geoanalysis = $geoanalysis; |
|
| 66 | - $this->depth = $depth; |
|
| 67 | - $this->detailed_top_places = $detailed_top_places; |
|
| 68 | - $this->use_flags = $use_flags; |
|
| 69 | - } |
|
| 70 | - |
|
| 71 | - /** |
|
| 72 | - * Create a copy of the view with a new ID. |
|
| 73 | - * |
|
| 74 | - * @param int $id |
|
| 75 | - * @return static |
|
| 76 | - */ |
|
| 77 | - public function withId(int $id): self |
|
| 78 | - { |
|
| 79 | - $new = clone $this; |
|
| 80 | - $new->id = $id; |
|
| 81 | - return $new; |
|
| 82 | - } |
|
| 83 | - |
|
| 84 | - /** |
|
| 85 | - * Create a copy of the view with new properties. |
|
| 86 | - * |
|
| 87 | - * @param bool $enabled |
|
| 88 | - * @param string $description |
|
| 89 | - * @param GeoAnalysisInterface $geoanalysis |
|
| 90 | - * @param int $depth |
|
| 91 | - * @param int $detailed_top_places |
|
| 92 | - * @param bool $use_flags |
|
| 93 | - * @return static |
|
| 94 | - */ |
|
| 95 | - public function with( |
|
| 96 | - bool $enabled, |
|
| 97 | - string $description, |
|
| 98 | - GeoAnalysisInterface $geoanalysis, |
|
| 99 | - int $depth, |
|
| 100 | - int $detailed_top_places = 0, |
|
| 101 | - bool $use_flags = false |
|
| 102 | - ): self { |
|
| 103 | - $new = clone $this; |
|
| 104 | - $new->enabled = $enabled; |
|
| 105 | - $new->description = $description; |
|
| 106 | - $new->geoanalysis = $geoanalysis; |
|
| 107 | - $new->depth = $depth; |
|
| 108 | - $new->detailed_top_places = $detailed_top_places; |
|
| 109 | - $new->use_flags = $use_flags; |
|
| 110 | - return $new; |
|
| 111 | - } |
|
| 112 | - |
|
| 113 | - /** |
|
| 114 | - * Get the view ID |
|
| 115 | - * |
|
| 116 | - * @return int |
|
| 117 | - */ |
|
| 118 | - public function id(): int |
|
| 119 | - { |
|
| 120 | - return $this->id; |
|
| 121 | - } |
|
| 122 | - |
|
| 123 | - /** |
|
| 124 | - * Get the view type for display |
|
| 125 | - * |
|
| 126 | - * @return string |
|
| 127 | - */ |
|
| 128 | - abstract public function type(): string; |
|
| 129 | - |
|
| 130 | - /** |
|
| 131 | - * Get the icon for the view type |
|
| 132 | - * |
|
| 133 | - * @param ModuleInterface $module |
|
| 134 | - * @return string |
|
| 135 | - */ |
|
| 136 | - abstract public function icon(ModuleInterface $module): string; |
|
| 137 | - |
|
| 138 | - /** |
|
| 139 | - * Return the content of the global settings section of the config page |
|
| 140 | - * |
|
| 141 | - * @param ModuleInterface $module |
|
| 142 | - * @return string |
|
| 143 | - */ |
|
| 144 | - abstract public function globalSettingsContent(ModuleInterface $module): string; |
|
| 145 | - |
|
| 146 | - /** |
|
| 147 | - * Return a view with global settings updated according to the view rules |
|
| 148 | - * |
|
| 149 | - * @param ServerRequestInterface $request |
|
| 150 | - * @return static |
|
| 151 | - */ |
|
| 152 | - abstract public function withGlobalSettingsUpdate(ServerRequestInterface $request): self; |
|
| 153 | - |
|
| 154 | - /** |
|
| 155 | - * Returns the content of the view global tab |
|
| 156 | - * |
|
| 157 | - * @param GeoDispersionModule $module |
|
| 158 | - * @param GeoAnalysisResult $result |
|
| 159 | - * @param array<string, mixed> $params |
|
| 160 | - * @return string |
|
| 161 | - */ |
|
| 162 | - abstract public function globalTabContent( |
|
| 163 | - GeoDispersionModule $module, |
|
| 164 | - GeoAnalysisResult $result, |
|
| 165 | - array $params |
|
| 166 | - ): string; |
|
| 167 | - |
|
| 168 | - /** |
|
| 169 | - * Returns the content of the view detailed tab |
|
| 170 | - * |
|
| 171 | - * @param ModuleInterface $module |
|
| 172 | - * @param Collection<string, GeoAnalysisResult> $results |
|
| 173 | - * @param array<string, mixed> $params |
|
| 174 | - * @return string |
|
| 175 | - */ |
|
| 176 | - public function detailedTabContent(ModuleInterface $module, Collection $results, array $params): string |
|
| 177 | - { |
|
| 178 | - return view($module->name() . '::geoanalysisview-tab-detailed', $params + [ 'results' => $results ]); |
|
| 179 | - } |
|
| 180 | - |
|
| 181 | - /** |
|
| 182 | - * Get the tree to which the view belongs |
|
| 183 | - * |
|
| 184 | - * @return Tree |
|
| 185 | - */ |
|
| 186 | - public function tree(): Tree |
|
| 187 | - { |
|
| 188 | - return $this->tree; |
|
| 189 | - } |
|
| 190 | - |
|
| 191 | - /** |
|
| 192 | - * Get the description of the view |
|
| 193 | - * |
|
| 194 | - * @return string |
|
| 195 | - */ |
|
| 196 | - public function description(): string |
|
| 197 | - { |
|
| 198 | - return $this->description; |
|
| 199 | - } |
|
| 200 | - |
|
| 201 | - /** |
|
| 202 | - * Get whether the view is enabled |
|
| 203 | - * |
|
| 204 | - * @return bool |
|
| 205 | - */ |
|
| 206 | - public function isEnabled(): bool |
|
| 207 | - { |
|
| 208 | - return $this->enabled; |
|
| 209 | - } |
|
| 210 | - |
|
| 211 | - /** |
|
| 212 | - * Get the geographical dispersion analysis for the view |
|
| 213 | - * |
|
| 214 | - * @return GeoAnalysisInterface |
|
| 215 | - */ |
|
| 216 | - public function analysis(): GeoAnalysisInterface |
|
| 217 | - { |
|
| 218 | - return $this->geoanalysis; |
|
| 219 | - } |
|
| 220 | - |
|
| 221 | - /** |
|
| 222 | - * Get the place hierarchy depth for the view |
|
| 223 | - * |
|
| 224 | - * @return int |
|
| 225 | - */ |
|
| 226 | - public function placesDepth(): int |
|
| 227 | - { |
|
| 228 | - return $this->depth; |
|
| 229 | - } |
|
| 230 | - |
|
| 231 | - /** |
|
| 232 | - * Get the number of places to display in the detailed tab |
|
| 233 | - * |
|
| 234 | - * @return int |
|
| 235 | - */ |
|
| 236 | - public function numberTopPlaces(): int |
|
| 237 | - { |
|
| 238 | - return $this->detailed_top_places; |
|
| 239 | - } |
|
| 240 | - |
|
| 241 | - /** |
|
| 242 | - * Get whether flags should be used in the detailed tab |
|
| 243 | - * |
|
| 244 | - * @return bool |
|
| 245 | - */ |
|
| 246 | - public function useFlags(): bool |
|
| 247 | - { |
|
| 248 | - return $this->use_flags; |
|
| 249 | - } |
|
| 30 | + private int $id; |
|
| 31 | + private Tree $tree; |
|
| 32 | + private bool $enabled; |
|
| 33 | + private string $description; |
|
| 34 | + private GeoAnalysisInterface $geoanalysis; |
|
| 35 | + private int $depth; |
|
| 36 | + private int $detailed_top_places; |
|
| 37 | + private bool $use_flags; |
|
| 38 | + |
|
| 39 | + /** |
|
| 40 | + * Constructor for AbstractGeoAnalysisView |
|
| 41 | + * |
|
| 42 | + * @param int $id |
|
| 43 | + * @param Tree $tree |
|
| 44 | + * @param bool $enabled |
|
| 45 | + * @param string $description |
|
| 46 | + * @param GeoAnalysisInterface $geoanalysis |
|
| 47 | + * @param int $depth |
|
| 48 | + * @param int $detailed_top_places |
|
| 49 | + * @param bool $use_flags |
|
| 50 | + */ |
|
| 51 | + final public function __construct( |
|
| 52 | + int $id, |
|
| 53 | + Tree $tree, |
|
| 54 | + bool $enabled, |
|
| 55 | + string $description, |
|
| 56 | + GeoAnalysisInterface $geoanalysis, |
|
| 57 | + int $depth, |
|
| 58 | + int $detailed_top_places = 0, |
|
| 59 | + bool $use_flags = false |
|
| 60 | + ) { |
|
| 61 | + $this->id = $id; |
|
| 62 | + $this->tree = $tree; |
|
| 63 | + $this->enabled = $enabled; |
|
| 64 | + $this->description = $description; |
|
| 65 | + $this->geoanalysis = $geoanalysis; |
|
| 66 | + $this->depth = $depth; |
|
| 67 | + $this->detailed_top_places = $detailed_top_places; |
|
| 68 | + $this->use_flags = $use_flags; |
|
| 69 | + } |
|
| 70 | + |
|
| 71 | + /** |
|
| 72 | + * Create a copy of the view with a new ID. |
|
| 73 | + * |
|
| 74 | + * @param int $id |
|
| 75 | + * @return static |
|
| 76 | + */ |
|
| 77 | + public function withId(int $id): self |
|
| 78 | + { |
|
| 79 | + $new = clone $this; |
|
| 80 | + $new->id = $id; |
|
| 81 | + return $new; |
|
| 82 | + } |
|
| 83 | + |
|
| 84 | + /** |
|
| 85 | + * Create a copy of the view with new properties. |
|
| 86 | + * |
|
| 87 | + * @param bool $enabled |
|
| 88 | + * @param string $description |
|
| 89 | + * @param GeoAnalysisInterface $geoanalysis |
|
| 90 | + * @param int $depth |
|
| 91 | + * @param int $detailed_top_places |
|
| 92 | + * @param bool $use_flags |
|
| 93 | + * @return static |
|
| 94 | + */ |
|
| 95 | + public function with( |
|
| 96 | + bool $enabled, |
|
| 97 | + string $description, |
|
| 98 | + GeoAnalysisInterface $geoanalysis, |
|
| 99 | + int $depth, |
|
| 100 | + int $detailed_top_places = 0, |
|
| 101 | + bool $use_flags = false |
|
| 102 | + ): self { |
|
| 103 | + $new = clone $this; |
|
| 104 | + $new->enabled = $enabled; |
|
| 105 | + $new->description = $description; |
|
| 106 | + $new->geoanalysis = $geoanalysis; |
|
| 107 | + $new->depth = $depth; |
|
| 108 | + $new->detailed_top_places = $detailed_top_places; |
|
| 109 | + $new->use_flags = $use_flags; |
|
| 110 | + return $new; |
|
| 111 | + } |
|
| 112 | + |
|
| 113 | + /** |
|
| 114 | + * Get the view ID |
|
| 115 | + * |
|
| 116 | + * @return int |
|
| 117 | + */ |
|
| 118 | + public function id(): int |
|
| 119 | + { |
|
| 120 | + return $this->id; |
|
| 121 | + } |
|
| 122 | + |
|
| 123 | + /** |
|
| 124 | + * Get the view type for display |
|
| 125 | + * |
|
| 126 | + * @return string |
|
| 127 | + */ |
|
| 128 | + abstract public function type(): string; |
|
| 129 | + |
|
| 130 | + /** |
|
| 131 | + * Get the icon for the view type |
|
| 132 | + * |
|
| 133 | + * @param ModuleInterface $module |
|
| 134 | + * @return string |
|
| 135 | + */ |
|
| 136 | + abstract public function icon(ModuleInterface $module): string; |
|
| 137 | + |
|
| 138 | + /** |
|
| 139 | + * Return the content of the global settings section of the config page |
|
| 140 | + * |
|
| 141 | + * @param ModuleInterface $module |
|
| 142 | + * @return string |
|
| 143 | + */ |
|
| 144 | + abstract public function globalSettingsContent(ModuleInterface $module): string; |
|
| 145 | + |
|
| 146 | + /** |
|
| 147 | + * Return a view with global settings updated according to the view rules |
|
| 148 | + * |
|
| 149 | + * @param ServerRequestInterface $request |
|
| 150 | + * @return static |
|
| 151 | + */ |
|
| 152 | + abstract public function withGlobalSettingsUpdate(ServerRequestInterface $request): self; |
|
| 153 | + |
|
| 154 | + /** |
|
| 155 | + * Returns the content of the view global tab |
|
| 156 | + * |
|
| 157 | + * @param GeoDispersionModule $module |
|
| 158 | + * @param GeoAnalysisResult $result |
|
| 159 | + * @param array<string, mixed> $params |
|
| 160 | + * @return string |
|
| 161 | + */ |
|
| 162 | + abstract public function globalTabContent( |
|
| 163 | + GeoDispersionModule $module, |
|
| 164 | + GeoAnalysisResult $result, |
|
| 165 | + array $params |
|
| 166 | + ): string; |
|
| 167 | + |
|
| 168 | + /** |
|
| 169 | + * Returns the content of the view detailed tab |
|
| 170 | + * |
|
| 171 | + * @param ModuleInterface $module |
|
| 172 | + * @param Collection<string, GeoAnalysisResult> $results |
|
| 173 | + * @param array<string, mixed> $params |
|
| 174 | + * @return string |
|
| 175 | + */ |
|
| 176 | + public function detailedTabContent(ModuleInterface $module, Collection $results, array $params): string |
|
| 177 | + { |
|
| 178 | + return view($module->name() . '::geoanalysisview-tab-detailed', $params + [ 'results' => $results ]); |
|
| 179 | + } |
|
| 180 | + |
|
| 181 | + /** |
|
| 182 | + * Get the tree to which the view belongs |
|
| 183 | + * |
|
| 184 | + * @return Tree |
|
| 185 | + */ |
|
| 186 | + public function tree(): Tree |
|
| 187 | + { |
|
| 188 | + return $this->tree; |
|
| 189 | + } |
|
| 190 | + |
|
| 191 | + /** |
|
| 192 | + * Get the description of the view |
|
| 193 | + * |
|
| 194 | + * @return string |
|
| 195 | + */ |
|
| 196 | + public function description(): string |
|
| 197 | + { |
|
| 198 | + return $this->description; |
|
| 199 | + } |
|
| 200 | + |
|
| 201 | + /** |
|
| 202 | + * Get whether the view is enabled |
|
| 203 | + * |
|
| 204 | + * @return bool |
|
| 205 | + */ |
|
| 206 | + public function isEnabled(): bool |
|
| 207 | + { |
|
| 208 | + return $this->enabled; |
|
| 209 | + } |
|
| 210 | + |
|
| 211 | + /** |
|
| 212 | + * Get the geographical dispersion analysis for the view |
|
| 213 | + * |
|
| 214 | + * @return GeoAnalysisInterface |
|
| 215 | + */ |
|
| 216 | + public function analysis(): GeoAnalysisInterface |
|
| 217 | + { |
|
| 218 | + return $this->geoanalysis; |
|
| 219 | + } |
|
| 220 | + |
|
| 221 | + /** |
|
| 222 | + * Get the place hierarchy depth for the view |
|
| 223 | + * |
|
| 224 | + * @return int |
|
| 225 | + */ |
|
| 226 | + public function placesDepth(): int |
|
| 227 | + { |
|
| 228 | + return $this->depth; |
|
| 229 | + } |
|
| 230 | + |
|
| 231 | + /** |
|
| 232 | + * Get the number of places to display in the detailed tab |
|
| 233 | + * |
|
| 234 | + * @return int |
|
| 235 | + */ |
|
| 236 | + public function numberTopPlaces(): int |
|
| 237 | + { |
|
| 238 | + return $this->detailed_top_places; |
|
| 239 | + } |
|
| 240 | + |
|
| 241 | + /** |
|
| 242 | + * Get whether flags should be used in the detailed tab |
|
| 243 | + * |
|
| 244 | + * @return bool |
|
| 245 | + */ |
|
| 246 | + public function useFlags(): bool |
|
| 247 | + { |
|
| 248 | + return $this->use_flags; |
|
| 249 | + } |
|
| 250 | 250 | } |
@@ -1,14 +1,14 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | /** |
| 4 | - * webtrees-lib: MyArtJaub library for webtrees |
|
| 5 | - * |
|
| 6 | - * @package MyArtJaub\Webtrees |
|
| 7 | - * @subpackage Hooks |
|
| 8 | - * @author Jonathan Jaubart <[email protected]> |
|
| 9 | - * @copyright Copyright (c) 2011-2022, Jonathan Jaubart |
|
| 10 | - * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 |
|
| 11 | - */ |
|
| 4 | + * webtrees-lib: MyArtJaub library for webtrees |
|
| 5 | + * |
|
| 6 | + * @package MyArtJaub\Webtrees |
|
| 7 | + * @subpackage Hooks |
|
| 8 | + * @author Jonathan Jaubart <[email protected]> |
|
| 9 | + * @copyright Copyright (c) 2011-2022, Jonathan Jaubart |
|
| 10 | + * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 |
|
| 11 | + */ |
|
| 12 | 12 | |
| 13 | 13 | declare(strict_types=1); |
| 14 | 14 | |
@@ -21,11 +21,11 @@ discard block |
||
| 21 | 21 | */ |
| 22 | 22 | interface NameAccordionExtenderInterface extends HookInterface |
| 23 | 23 | { |
| 24 | - /** |
|
| 25 | - * Add a new card to the names accordion. |
|
| 26 | - * |
|
| 27 | - * @param Individual $individual |
|
| 28 | - * @return string |
|
| 29 | - */ |
|
| 30 | - public function accordionCard(Individual $individual): string; |
|
| 24 | + /** |
|
| 25 | + * Add a new card to the names accordion. |
|
| 26 | + * |
|
| 27 | + * @param Individual $individual |
|
| 28 | + * @return string |
|
| 29 | + */ |
|
| 30 | + public function accordionCard(Individual $individual): string; |
|
| 31 | 31 | } |
@@ -1,14 +1,14 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | /** |
| 4 | - * webtrees-lib: MyArtJaub library for webtrees |
|
| 5 | - * |
|
| 6 | - * @package MyArtJaub\Webtrees |
|
| 7 | - * @subpackage Hooks |
|
| 8 | - * @author Jonathan Jaubart <[email protected]> |
|
| 9 | - * @copyright Copyright (c) 2011-2022, Jonathan Jaubart |
|
| 10 | - * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 |
|
| 11 | - */ |
|
| 4 | + * webtrees-lib: MyArtJaub library for webtrees |
|
| 5 | + * |
|
| 6 | + * @package MyArtJaub\Webtrees |
|
| 7 | + * @subpackage Hooks |
|
| 8 | + * @author Jonathan Jaubart <[email protected]> |
|
| 9 | + * @copyright Copyright (c) 2011-2022, Jonathan Jaubart |
|
| 10 | + * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 |
|
| 11 | + */ |
|
| 12 | 12 | |
| 13 | 13 | declare(strict_types=1); |
| 14 | 14 | |
@@ -19,10 +19,10 @@ discard block |
||
| 19 | 19 | */ |
| 20 | 20 | interface ModuleHookSubscriberInterface |
| 21 | 21 | { |
| 22 | - /** |
|
| 23 | - * List hooks to be subscribed by the module as an array. |
|
| 24 | - * |
|
| 25 | - * @return HookInterface[] |
|
| 26 | - */ |
|
| 27 | - public function listSubscribedHooks(): array; |
|
| 22 | + /** |
|
| 23 | + * List hooks to be subscribed by the module as an array. |
|
| 24 | + * |
|
| 25 | + * @return HookInterface[] |
|
| 26 | + */ |
|
| 27 | + public function listSubscribedHooks(): array; |
|
| 28 | 28 | } |
@@ -1,14 +1,14 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | /** |
| 4 | - * webtrees-lib: MyArtJaub library for webtrees |
|
| 5 | - * |
|
| 6 | - * @package MyArtJaub\Webtrees |
|
| 7 | - * @subpackage Hooks |
|
| 8 | - * @author Jonathan Jaubart <[email protected]> |
|
| 9 | - * @copyright Copyright (c) 2011-2022, Jonathan Jaubart |
|
| 10 | - * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 |
|
| 11 | - */ |
|
| 4 | + * webtrees-lib: MyArtJaub library for webtrees |
|
| 5 | + * |
|
| 6 | + * @package MyArtJaub\Webtrees |
|
| 7 | + * @subpackage Hooks |
|
| 8 | + * @author Jonathan Jaubart <[email protected]> |
|
| 9 | + * @copyright Copyright (c) 2011-2022, Jonathan Jaubart |
|
| 10 | + * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 |
|
| 11 | + */ |
|
| 12 | 12 | |
| 13 | 13 | declare(strict_types=1); |
| 14 | 14 | |
@@ -19,11 +19,11 @@ discard block |
||
| 19 | 19 | */ |
| 20 | 20 | interface FamilyDatatablesExtenderInterface extends HookInterface |
| 21 | 21 | { |
| 22 | - /** |
|
| 23 | - * Get the columns to be added to families datatables |
|
| 24 | - * |
|
| 25 | - * @param iterable<\Fisharebest\Webtrees\Family> $records |
|
| 26 | - * @return array<string, array<string, array<string, mixed>>> |
|
| 27 | - */ |
|
| 28 | - public function familyColumns(iterable $records): array; |
|
| 22 | + /** |
|
| 23 | + * Get the columns to be added to families datatables |
|
| 24 | + * |
|
| 25 | + * @param iterable<\Fisharebest\Webtrees\Family> $records |
|
| 26 | + * @return array<string, array<string, array<string, mixed>>> |
|
| 27 | + */ |
|
| 28 | + public function familyColumns(iterable $records): array; |
|
| 29 | 29 | } |
@@ -1,14 +1,14 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | /** |
| 4 | - * webtrees-lib: MyArtJaub library for webtrees |
|
| 5 | - * |
|
| 6 | - * @package MyArtJaub\Webtrees |
|
| 7 | - * @subpackage Hooks |
|
| 8 | - * @author Jonathan Jaubart <[email protected]> |
|
| 9 | - * @copyright Copyright (c) 2011-2022, Jonathan Jaubart |
|
| 10 | - * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 |
|
| 11 | - */ |
|
| 4 | + * webtrees-lib: MyArtJaub library for webtrees |
|
| 5 | + * |
|
| 6 | + * @package MyArtJaub\Webtrees |
|
| 7 | + * @subpackage Hooks |
|
| 8 | + * @author Jonathan Jaubart <[email protected]> |
|
| 9 | + * @copyright Copyright (c) 2011-2022, Jonathan Jaubart |
|
| 10 | + * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 |
|
| 11 | + */ |
|
| 12 | 12 | |
| 13 | 13 | declare(strict_types=1); |
| 14 | 14 | |
@@ -21,46 +21,46 @@ discard block |
||
| 21 | 21 | */ |
| 22 | 22 | interface HookCollectorInterface |
| 23 | 23 | { |
| 24 | - /** |
|
| 25 | - * Get the unique internal name for the hook collector |
|
| 26 | - * |
|
| 27 | - * @return string |
|
| 28 | - */ |
|
| 29 | - public function name(): string; |
|
| 24 | + /** |
|
| 25 | + * Get the unique internal name for the hook collector |
|
| 26 | + * |
|
| 27 | + * @return string |
|
| 28 | + */ |
|
| 29 | + public function name(): string; |
|
| 30 | 30 | |
| 31 | - /** |
|
| 32 | - * Get the title to be displayed to idenfity the hook collector |
|
| 33 | - * |
|
| 34 | - * @return string |
|
| 35 | - */ |
|
| 36 | - public function title(): string; |
|
| 31 | + /** |
|
| 32 | + * Get the title to be displayed to idenfity the hook collector |
|
| 33 | + * |
|
| 34 | + * @return string |
|
| 35 | + */ |
|
| 36 | + public function title(): string; |
|
| 37 | 37 | |
| 38 | - /** |
|
| 39 | - * Get a short description for the hook collector |
|
| 40 | - * |
|
| 41 | - * @return string |
|
| 42 | - */ |
|
| 43 | - public function description(): string; |
|
| 38 | + /** |
|
| 39 | + * Get a short description for the hook collector |
|
| 40 | + * |
|
| 41 | + * @return string |
|
| 42 | + */ |
|
| 43 | + public function description(): string; |
|
| 44 | 44 | |
| 45 | - /** |
|
| 46 | - * Get the interface collated by the hook collector |
|
| 47 | - * |
|
| 48 | - * @return class-string |
|
| 49 | - */ |
|
| 50 | - public function hookInterface(): string; |
|
| 45 | + /** |
|
| 46 | + * Get the interface collated by the hook collector |
|
| 47 | + * |
|
| 48 | + * @return class-string |
|
| 49 | + */ |
|
| 50 | + public function hookInterface(): string; |
|
| 51 | 51 | |
| 52 | - /** |
|
| 53 | - * Register a hook instance in the hook collector |
|
| 54 | - * |
|
| 55 | - * @param HookInterface $hook_instance |
|
| 56 | - * @param int $order |
|
| 57 | - */ |
|
| 58 | - public function register(HookInterface $hook_instance, int $order): void; |
|
| 52 | + /** |
|
| 53 | + * Register a hook instance in the hook collector |
|
| 54 | + * |
|
| 55 | + * @param HookInterface $hook_instance |
|
| 56 | + * @param int $order |
|
| 57 | + */ |
|
| 58 | + public function register(HookInterface $hook_instance, int $order): void; |
|
| 59 | 59 | |
| 60 | - /** |
|
| 61 | - * Get the list of hooks registered against the hook collector |
|
| 62 | - * |
|
| 63 | - * @return Collection<HookInterface> |
|
| 64 | - */ |
|
| 65 | - public function hooks(): Collection; |
|
| 60 | + /** |
|
| 61 | + * Get the list of hooks registered against the hook collector |
|
| 62 | + * |
|
| 63 | + * @return Collection<HookInterface> |
|
| 64 | + */ |
|
| 65 | + public function hooks(): Collection; |
|
| 66 | 66 | } |
@@ -1,14 +1,14 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | /** |
| 4 | - * webtrees-lib: MyArtJaub library for webtrees |
|
| 5 | - * |
|
| 6 | - * @package MyArtJaub\Webtrees |
|
| 7 | - * @subpackage Hooks |
|
| 8 | - * @author Jonathan Jaubart <[email protected]> |
|
| 9 | - * @copyright Copyright (c) 2011-2022, Jonathan Jaubart |
|
| 10 | - * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 |
|
| 11 | - */ |
|
| 4 | + * webtrees-lib: MyArtJaub library for webtrees |
|
| 5 | + * |
|
| 6 | + * @package MyArtJaub\Webtrees |
|
| 7 | + * @subpackage Hooks |
|
| 8 | + * @author Jonathan Jaubart <[email protected]> |
|
| 9 | + * @copyright Copyright (c) 2011-2022, Jonathan Jaubart |
|
| 10 | + * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 |
|
| 11 | + */ |
|
| 12 | 12 | |
| 13 | 13 | declare(strict_types=1); |
| 14 | 14 | |
@@ -19,11 +19,11 @@ discard block |
||
| 19 | 19 | */ |
| 20 | 20 | interface SosaMissingDatatablesExtenderInterface extends HookInterface |
| 21 | 21 | { |
| 22 | - /** |
|
| 23 | - * Get the columns to be added to missing ancestors datatables |
|
| 24 | - * |
|
| 25 | - * @param iterable<\Fisharebest\Webtrees\Individual> $records |
|
| 26 | - * @return array<string, array<string, array<string, mixed>>> |
|
| 27 | - */ |
|
| 28 | - public function sosaMissingColumns(iterable $records): array; |
|
| 22 | + /** |
|
| 23 | + * Get the columns to be added to missing ancestors datatables |
|
| 24 | + * |
|
| 25 | + * @param iterable<\Fisharebest\Webtrees\Individual> $records |
|
| 26 | + * @return array<string, array<string, array<string, mixed>>> |
|
| 27 | + */ |
|
| 28 | + public function sosaMissingColumns(iterable $records): array; |
|
| 29 | 29 | } |
@@ -1,14 +1,14 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | /** |
| 4 | - * webtrees-lib: MyArtJaub library for webtrees |
|
| 5 | - * |
|
| 6 | - * @package MyArtJaub\Webtrees |
|
| 7 | - * @subpackage Hooks |
|
| 8 | - * @author Jonathan Jaubart <[email protected]> |
|
| 9 | - * @copyright Copyright (c) 2011-2022, Jonathan Jaubart |
|
| 10 | - * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 |
|
| 11 | - */ |
|
| 4 | + * webtrees-lib: MyArtJaub library for webtrees |
|
| 5 | + * |
|
| 6 | + * @package MyArtJaub\Webtrees |
|
| 7 | + * @subpackage Hooks |
|
| 8 | + * @author Jonathan Jaubart <[email protected]> |
|
| 9 | + * @copyright Copyright (c) 2011-2022, Jonathan Jaubart |
|
| 10 | + * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 |
|
| 11 | + */ |
|
| 12 | 12 | |
| 13 | 13 | declare(strict_types=1); |
| 14 | 14 | |
@@ -21,10 +21,10 @@ discard block |
||
| 21 | 21 | */ |
| 22 | 22 | interface HookInterface |
| 23 | 23 | { |
| 24 | - /** |
|
| 25 | - * Get the module attached to the hook |
|
| 26 | - * |
|
| 27 | - * @return ModuleInterface |
|
| 28 | - */ |
|
| 29 | - public function module(): ModuleInterface; |
|
| 24 | + /** |
|
| 25 | + * Get the module attached to the hook |
|
| 26 | + * |
|
| 27 | + * @return ModuleInterface |
|
| 28 | + */ |
|
| 29 | + public function module(): ModuleInterface; |
|
| 30 | 30 | } |
@@ -1,14 +1,14 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | /** |
| 4 | - * webtrees-lib: MyArtJaub library for webtrees |
|
| 5 | - * |
|
| 6 | - * @package MyArtJaub\Webtrees |
|
| 7 | - * @subpackage Hooks |
|
| 8 | - * @author Jonathan Jaubart <[email protected]> |
|
| 9 | - * @copyright Copyright (c) 2011-2022, Jonathan Jaubart |
|
| 10 | - * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 |
|
| 11 | - */ |
|
| 4 | + * webtrees-lib: MyArtJaub library for webtrees |
|
| 5 | + * |
|
| 6 | + * @package MyArtJaub\Webtrees |
|
| 7 | + * @subpackage Hooks |
|
| 8 | + * @author Jonathan Jaubart <[email protected]> |
|
| 9 | + * @copyright Copyright (c) 2011-2022, Jonathan Jaubart |
|
| 10 | + * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 |
|
| 11 | + */ |
|
| 12 | 12 | |
| 13 | 13 | declare(strict_types=1); |
| 14 | 14 | |
@@ -21,21 +21,21 @@ discard block |
||
| 21 | 21 | */ |
| 22 | 22 | interface FactSourceTextExtenderInterface extends HookInterface |
| 23 | 23 | { |
| 24 | - /** |
|
| 25 | - * Insert some content before the source citation title. |
|
| 26 | - * |
|
| 27 | - * @param Tree $tree |
|
| 28 | - * @param \Fisharebest\Webtrees\Fact|array<array<\Fisharebest\Webtrees\Contracts\ElementInterface|string>> $fact |
|
| 29 | - * @return string |
|
| 30 | - */ |
|
| 31 | - public function factSourcePrepend(Tree $tree, $fact): string; |
|
| 24 | + /** |
|
| 25 | + * Insert some content before the source citation title. |
|
| 26 | + * |
|
| 27 | + * @param Tree $tree |
|
| 28 | + * @param \Fisharebest\Webtrees\Fact|array<array<\Fisharebest\Webtrees\Contracts\ElementInterface|string>> $fact |
|
| 29 | + * @return string |
|
| 30 | + */ |
|
| 31 | + public function factSourcePrepend(Tree $tree, $fact): string; |
|
| 32 | 32 | |
| 33 | - /** |
|
| 34 | - * Insert some content after the source citation title. |
|
| 35 | - * |
|
| 36 | - * @param Tree $tree |
|
| 37 | - * @param \Fisharebest\Webtrees\Fact|array<array<\Fisharebest\Webtrees\Contracts\ElementInterface|string>> $fact |
|
| 38 | - * @return string |
|
| 39 | - */ |
|
| 40 | - public function factSourceAppend(Tree $tree, $fact): string; |
|
| 33 | + /** |
|
| 34 | + * Insert some content after the source citation title. |
|
| 35 | + * |
|
| 36 | + * @param Tree $tree |
|
| 37 | + * @param \Fisharebest\Webtrees\Fact|array<array<\Fisharebest\Webtrees\Contracts\ElementInterface|string>> $fact |
|
| 38 | + * @return string |
|
| 39 | + */ |
|
| 40 | + public function factSourceAppend(Tree $tree, $fact): string; |
|
| 41 | 41 | } |