Subversion Repositories oidplus

Rev

Rev 1086 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1086 Rev 1116
Line 23... Line 23...
23
\defined('INSIDE_OIDPLUS') or die;
23
\defined('INSIDE_OIDPLUS') or die;
24
// phpcs:enable PSR1.Files.SideEffects
24
// phpcs:enable PSR1.Files.SideEffects
25
 
25
 
26
class OIDplusPagePublicContactEMail extends OIDplusPagePluginPublic {
26
class OIDplusPagePublicContactEMail extends OIDplusPagePluginPublic {
27
 
27
 
-
 
28
        /**
-
 
29
         * @param bool $html
-
 
30
         * @return void
-
 
31
         */
28
        public function init($html=true) {
32
        public function init(bool $html=true) {
29
                // Nothing
33
                // Nothing
30
        }
34
        }
31
 
35
 
-
 
36
        /**
-
 
37
         * @param string $id
-
 
38
         * @param array $out
-
 
39
         * @param bool $handled
-
 
40
         * @return void
-
 
41
         * @throws OIDplusException
-
 
42
         */
32
        public function gui($id, &$out, &$handled) {
43
        public function gui(string $id, array &$out, bool &$handled) {
33
                if ($id === 'oidplus:contact') {
44
                if ($id === 'oidplus:contact') {
34
                        $handled = true;
45
                        $handled = true;
35
                        $out['title'] = _L('Contact administrator');
46
                        $out['title'] = _L('Contact administrator');
36
                        $out['icon'] = file_exists(__DIR__.'/img/main_icon.png') ? OIDplus::webpath(__DIR__,OIDplus::PATH_RELATIVE).'img/main_icon.png' : '';
47
                        $out['icon'] = file_exists(__DIR__.'/img/main_icon.png') ? OIDplus::webpath(__DIR__,OIDplus::PATH_RELATIVE).'img/main_icon.png' : '';
37
 
48
 
Line 42... Line 53...
42
                                $out['text'] = '<p>'._L('You can contact the administrator of this OIDplus system at this email address').':</p><p><a href="mailto:'.htmlentities($admin_email).'">'.htmlentities($admin_email).'</a></p>';
53
                                $out['text'] = '<p>'._L('You can contact the administrator of this OIDplus system at this email address').':</p><p><a href="mailto:'.htmlentities($admin_email).'">'.htmlentities($admin_email).'</a></p>';
43
                        }
54
                        }
44
                }
55
                }
45
        }
56
        }
46
 
57
 
-
 
58
        /**
-
 
59
         * @param array $out
-
 
60
         * @return void
-
 
61
         */
47
        public function publicSitemap(&$out) {
62
        public function publicSitemap(array &$out) {
48
                $out[] = 'oidplus:contact';
63
                $out[] = 'oidplus:contact';
49
        }
64
        }
50
 
65
 
-
 
66
        /**
-
 
67
         * @param array $json
-
 
68
         * @param string|null $ra_email
-
 
69
         * @param bool $nonjs
-
 
70
         * @param string $req_goto
-
 
71
         * @return bool
-
 
72
         * @throws OIDplusException
-
 
73
         */
51
        public function tree(&$json, $ra_email=null, $nonjs=false, $req_goto='') {
74
        public function tree(array &$json, string $ra_email=null, bool $nonjs=false, string $req_goto=''): bool {
52
                if (file_exists(__DIR__.'/img/main_icon16.png')) {
75
                if (file_exists(__DIR__.'/img/main_icon16.png')) {
53
                        $tree_icon = OIDplus::webpath(__DIR__,OIDplus::PATH_RELATIVE).'img/main_icon16.png';
76
                        $tree_icon = OIDplus::webpath(__DIR__,OIDplus::PATH_RELATIVE).'img/main_icon16.png';
54
                } else {
77
                } else {
55
                        $tree_icon = null; // default icon (folder)
78
                        $tree_icon = null; // default icon (folder)
56
                }
79
                }
Line 62... Line 85...
62
                );
85
                );
63
 
86
 
64
                return true;
87
                return true;
65
        }
88
        }
66
 
89
 
-
 
90
        /**
-
 
91
         * @param string $request
-
 
92
         * @return array|false
-
 
93
         */
67
        public function tree_search($request) {
94
        public function tree_search(string $request) {
68
                return false;
95
                return false;
69
        }
96
        }
70
}
97
}
71
98