1 | <?php |
||
33 | class CertificatesModule |
||
34 | extends AbstractModule |
||
35 | implements HookSubscriberInterface, ModuleConfigInterface, ModuleMenuItemInterface, FactSourceTextExtenderInterface, CustomSimpleTagManagerInterface |
||
36 | { |
||
37 | /** @var string For custom modules - link for support, upgrades, etc. */ |
||
38 | const CUSTOM_WEBSITE = 'https://github.com/jon48/webtrees-lib'; |
||
39 | |||
40 | /** |
||
41 | * Provider for Certificates |
||
42 | * @var CertificateProviderInterface $provider |
||
43 | */ |
||
44 | protected $provider; |
||
45 | |||
46 | /** |
||
47 | * {@inhericDoc} |
||
48 | */ |
||
49 | public function getTitle() { |
||
52 | |||
53 | /** |
||
54 | * {@inhericDoc} |
||
55 | */ |
||
56 | public function getDescription() { |
||
59 | |||
60 | /** |
||
61 | * {@inhericDoc} |
||
62 | */ |
||
63 | public function modAction($mod_action) { |
||
66 | |||
67 | /** |
||
68 | * {@inhericDoc} |
||
69 | * @see \Fisharebest\Webtrees\Module\ModuleConfigInterface::getConfigLink() |
||
70 | */ |
||
71 | public function getConfigLink() { |
||
74 | |||
75 | /** |
||
76 | * {@inhericDoc} |
||
77 | * @see \MyArtJaub\Webtrees\Hook\HookSubscriberInterface::getSubscribedHooks() |
||
78 | */ |
||
79 | public function getSubscribedHooks() { |
||
90 | |||
91 | /** |
||
92 | * {@inhericDoc} |
||
93 | * @see \MyArtJaub\Webtrees\Module\ModuleMenuItemInterface::getMenu() |
||
94 | */ |
||
95 | public function getMenu(Tree $tree, $reference = null) { |
||
99 | |||
100 | /** |
||
101 | * {@inhericDoc} |
||
102 | * @see \MyArtJaub\Webtrees\Hook\HookInterfaces\FactSourceTextExtenderInterface::hFactSourcePrepend() |
||
103 | */ |
||
104 | public function hFactSourcePrepend($srec) { |
||
133 | |||
134 | /** |
||
135 | * {@inhericDoc} |
||
136 | * @see \MyArtJaub\Webtrees\Hook\HookInterfaces\FactSourceTextExtenderInterface::hFactSourceAppend() |
||
137 | */ |
||
138 | public function hFactSourceAppend($srec) { } |
||
139 | |||
140 | /** |
||
141 | * {@inhericDoc} |
||
142 | * @see \MyArtJaub\Webtrees\Hook\HookInterfaces\CustomSimpleTagManagerInterface::hGetExpectedTags() |
||
143 | */ |
||
144 | public function hGetExpectedTags() { |
||
147 | |||
148 | /** |
||
149 | * {@inhericDoc} |
||
150 | * @see \MyArtJaub\Webtrees\Hook\HookInterfaces\CustomSimpleTagManagerInterface::hHtmlSimpleTagDisplay() |
||
151 | */ |
||
152 | public function hHtmlSimpleTagDisplay($tag, $value, $context = null, $contextid = null) { |
||
161 | |||
162 | /** |
||
163 | * {@inhericDoc} |
||
164 | * @see \MyArtJaub\Webtrees\Hook\HookInterfaces\CustomSimpleTagManagerInterface::hHtmlSimpleTagEditor() |
||
165 | */ |
||
166 | public function hHtmlSimpleTagEditor($tag, $value = null, $element_id = '', $element_name = '', $context = null, $contextid = null) { |
||
196 | |||
197 | /** |
||
198 | * {@inhericDoc} |
||
199 | * @see \MyArtJaub\Webtrees\Hook\HookInterfaces\CustomSimpleTagManagerInterface::hAddSimpleTag() |
||
200 | */ |
||
201 | public function hAddSimpleTag($context, $level) { |
||
208 | |||
209 | /** |
||
210 | * {@inhericDoc} |
||
211 | * @see \MyArtJaub\Webtrees\Hook\HookInterfaces\CustomSimpleTagManagerInterface::hHasHelpTextTag() |
||
212 | */ |
||
213 | public function hHasHelpTextTag($tag) { |
||
220 | |||
221 | /** |
||
222 | * {@inhericDoc} |
||
223 | * @see \MyArtJaub\Webtrees\Hook\HookInterfaces\CustomSimpleTagManagerInterface::hGetHelpTextTag() |
||
224 | */ |
||
225 | public function hGetHelpTextTag($tag) { |
||
235 | |||
236 | /** |
||
237 | * Returns the default Certificate File Provider, as configured in the module |
||
238 | * |
||
239 | * @return \MyArtJaub\Webtrees\Module\Certificates\Model\CertificateProviderInterface |
||
240 | */ |
||
241 | public function getProvider() { |
||
248 | |||
249 | |||
250 | /** |
||
251 | * Return the HTML code for custom simple tag _ACT |
||
252 | * |
||
253 | * @param Certificate $certificatePath Certificate (as per the GEDCOM) |
||
254 | * @param string|null $sid Linked Source ID, if it exists |
||
255 | */ |
||
256 | protected function getDisplay_ACT(Certificate $certificate, $sid = null){ |
||
264 | |||
265 | |||
266 | } |
||
267 |
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: