1 | <?php |
||
32 | class CertificatesModule |
||
33 | extends AbstractModule |
||
34 | implements HookSubscriberInterface, ModuleConfigInterface, ModuleMenuItemInterface, FactSourceTextExtenderInterface, CustomSimpleTagManagerInterface, DependentInterface |
||
35 | { |
||
36 | /** @var string For custom modules - link for support, upgrades, etc. */ |
||
37 | const CUSTOM_WEBSITE = 'https://github.com/jon48/webtrees-lib'; |
||
38 | |||
39 | /** |
||
40 | * Provider for Certificates |
||
41 | * @var CertificateProviderInterface $provider |
||
42 | */ |
||
43 | protected $provider; |
||
44 | |||
45 | /** |
||
46 | * {@inhericDoc} |
||
47 | */ |
||
48 | public function getTitle() { |
||
51 | |||
52 | /** |
||
53 | * {@inhericDoc} |
||
54 | */ |
||
55 | public function getDescription() { |
||
58 | |||
59 | /** |
||
60 | * {@inhericDoc} |
||
61 | */ |
||
62 | public function modAction($mod_action) { |
||
65 | |||
66 | /** |
||
67 | * {@inheritDoc} |
||
68 | * @see \MyArtJaub\Webtrees\Module\DependentInterface::validatePrerequisites() |
||
69 | */ |
||
70 | public function validatePrerequisites() { |
||
73 | |||
74 | /** |
||
75 | * {@inhericDoc} |
||
76 | * @see \Fisharebest\Webtrees\Module\ModuleConfigInterface::getConfigLink() |
||
77 | */ |
||
78 | public function getConfigLink() { |
||
81 | |||
82 | /** |
||
83 | * {@inhericDoc} |
||
84 | * @see \MyArtJaub\Webtrees\Hook\HookSubscriberInterface::getSubscribedHooks() |
||
85 | */ |
||
86 | public function getSubscribedHooks() { |
||
97 | |||
98 | /** |
||
99 | * {@inhericDoc} |
||
100 | * @see \MyArtJaub\Webtrees\Module\ModuleMenuItemInterface::getMenu() |
||
101 | */ |
||
102 | public function getMenu(Tree $tree, $reference = null) { |
||
106 | |||
107 | /** |
||
108 | * {@inhericDoc} |
||
109 | * @see \MyArtJaub\Webtrees\Hook\HookInterfaces\FactSourceTextExtenderInterface::hFactSourcePrepend() |
||
110 | */ |
||
111 | public function hFactSourcePrepend($srec) { |
||
141 | |||
142 | /** |
||
143 | * {@inhericDoc} |
||
144 | * @see \MyArtJaub\Webtrees\Hook\HookInterfaces\FactSourceTextExtenderInterface::hFactSourceAppend() |
||
145 | */ |
||
146 | public function hFactSourceAppend($srec) { } |
||
147 | |||
148 | /** |
||
149 | * {@inhericDoc} |
||
150 | * @see \MyArtJaub\Webtrees\Hook\HookInterfaces\CustomSimpleTagManagerInterface::hGetExpectedTags() |
||
151 | */ |
||
152 | public function hGetExpectedTags() { |
||
155 | |||
156 | /** |
||
157 | * {@inhericDoc} |
||
158 | * @see \MyArtJaub\Webtrees\Hook\HookInterfaces\CustomSimpleTagManagerInterface::hHtmlSimpleTagDisplay() |
||
159 | */ |
||
160 | public function hHtmlSimpleTagDisplay($tag, $value, $context = null, $contextid = null) { |
||
169 | |||
170 | /** |
||
171 | * {@inhericDoc} |
||
172 | * @see \MyArtJaub\Webtrees\Hook\HookInterfaces\CustomSimpleTagManagerInterface::hHtmlSimpleTagEditor() |
||
173 | */ |
||
174 | public function hHtmlSimpleTagEditor($tag, $value = null, $element_id = '', $element_name = '', $context = null, $contextid = null) { |
||
206 | |||
207 | /** |
||
208 | * {@inhericDoc} |
||
209 | * @see \MyArtJaub\Webtrees\Hook\HookInterfaces\CustomSimpleTagManagerInterface::hAddSimpleTag() |
||
210 | */ |
||
211 | public function hAddSimpleTag($context, $level) { |
||
218 | |||
219 | /** |
||
220 | * {@inhericDoc} |
||
221 | * @see \MyArtJaub\Webtrees\Hook\HookInterfaces\CustomSimpleTagManagerInterface::hHasHelpTextTag() |
||
222 | */ |
||
223 | public function hHasHelpTextTag($tag) { |
||
230 | |||
231 | /** |
||
232 | * {@inhericDoc} |
||
233 | * @see \MyArtJaub\Webtrees\Hook\HookInterfaces\CustomSimpleTagManagerInterface::hGetHelpTextTag() |
||
234 | */ |
||
235 | public function hGetHelpTextTag($tag) { |
||
245 | |||
246 | /** |
||
247 | * Returns the default Certificate File Provider, as configured in the module |
||
248 | * |
||
249 | * @return \MyArtJaub\Webtrees\Module\Certificates\Model\CertificateProviderInterface |
||
250 | */ |
||
251 | public function getProvider() { |
||
260 | |||
261 | |||
262 | /** |
||
263 | * Return the HTML code for custom simple tag _ACT |
||
264 | * |
||
265 | * @param Certificate $certificatePath Certificate (as per the GEDCOM) |
||
266 | * @param string|null $sid Linked Source ID, if it exists |
||
267 | */ |
||
268 | protected function getDisplay_ACT(Certificate $certificate, $sid = null){ |
||
276 | |||
277 | |||
278 | } |
||
279 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: