1717 *
1818 * @copyright 2020 XOOPS Project (https://xoops.org)
1919 * @license GPL 2.0 or later
20+ * @package Modulebuilder
2021 * @since 1.0
2122 * @min_xoops 2.5.9
2223 * @author Goffy - Email:<goffy@myxoops.org> - Website:<https://xoops.org>
3940 */
4041class Confirm
4142{
42- private $ hiddens = [];
43- private $ action = '' ;
44- private $ title = '' ;
45- private $ label = '' ;
46- private $ object = '' ;
43+ private array $ hiddens = [];
44+ private string $ action = '' ;
45+ private string $ title = '' ;
46+ private string $ label = '' ;
47+ private string $ object = '' ;
4748
4849 /**
4950 * @public function constructor class
50- * @param $hiddens
51- * @param $action
52- * @param $object
51+ * @param array $hiddens
52+ * @param string $action
53+ * @param string $object
5354 * @param string $title
5455 * @param string $label
5556 */
56- public function __construct ($ hiddens , $ action , $ object , string $ title = '' , string $ label = '' )
57+ public function __construct (array $ hiddens , string $ action , string $ object , string $ title = '' , string $ label = '' )
5758 {
5859 $ this ->hiddens = $ hiddens ;
5960 $ this ->action = $ action ;
@@ -66,9 +67,9 @@ public function __construct($hiddens, $action, $object, string $title = '', stri
6667 * @public function getFormConfirm
6768 * @return \XoopsThemeForm
6869 */
69- public function getFormConfirm ()
70+ public function getFormConfirm (): \ XoopsThemeForm
7071 {
71- $ moduleDirName = \basename (__DIR__ );
72+ $ moduleDirName = \basename (\dirname ( __DIR__ , 2 ) );
7273 $ moduleDirNameUpper = \mb_strtoupper ($ moduleDirName );
7374 //in order to be accessable from user and admin area this should be place in language common.php
7475 if (!\defined ('CO_ ' . $ moduleDirNameUpper . '_DELETE_CONFIRM ' )) {
0 commit comments