1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
namespace XoopsModules\Countdown; |
6
|
|
|
|
7
|
|
|
/* |
8
|
|
|
You may not change or alter any portion of this comment or credits |
9
|
|
|
of supporting developers from this source code or any supporting source code |
10
|
|
|
which is considered copyrighted (c) material of the original comment or credit authors. |
11
|
|
|
|
12
|
|
|
This program is distributed in the hope that it will be useful, |
13
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
14
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
15
|
|
|
*/ |
16
|
|
|
|
17
|
|
|
/** |
18
|
|
|
* Module: Countdown |
19
|
|
|
* |
20
|
|
|
* @category Module |
21
|
|
|
* @package countdown |
22
|
|
|
* @author XOOPS Development Team <https://xoops.org> |
23
|
|
|
* @copyright {@link https://xoops.org/ XOOPS Project} |
24
|
|
|
* @license GNU GPL 2 or later (https://www.gnu.org/licenses/gpl-2.0.html) |
25
|
|
|
* @link https://xoops.org/ |
26
|
|
|
* @since 1.0.0 |
27
|
|
|
*/ |
28
|
|
|
|
29
|
|
|
use XoopsModules\Countdown; |
30
|
|
|
use XoopsModules\Countdown\Form; |
31
|
|
|
|
32
|
|
|
$moduleDirName = basename(dirname(__DIR__)); |
33
|
|
|
|
34
|
|
|
//$permHelper = new \Xmf\Module\Helper\Permission(); |
35
|
|
|
|
36
|
|
|
/** |
37
|
|
|
* Class Category |
38
|
|
|
*/ |
39
|
|
|
class Category extends \XoopsObject |
40
|
|
|
{ |
41
|
|
|
/** |
42
|
|
|
* Constructor |
43
|
|
|
* |
44
|
|
|
* @param null |
45
|
|
|
*/ |
46
|
|
|
public function __construct() |
47
|
|
|
{ |
48
|
|
|
parent::__construct(); |
49
|
|
|
$this->initVar('category_id', XOBJ_DTYPE_INT); |
50
|
|
|
$this->initVar('category_title', XOBJ_DTYPE_TXTBOX); |
51
|
|
|
$this->initVar('category_weight', XOBJ_DTYPE_TXTBOX); |
52
|
|
|
} |
53
|
|
|
|
54
|
|
|
/** |
55
|
|
|
* Get form |
56
|
|
|
* |
57
|
|
|
* @param null |
58
|
|
|
* @return CategoryForm |
|
|
|
|
59
|
|
|
*/ |
60
|
|
|
public function getForm() |
61
|
|
|
{ |
62
|
|
|
$form = new Form\CategoryForm($this); |
63
|
|
|
return $form; |
|
|
|
|
64
|
|
|
} |
65
|
|
|
|
66
|
|
|
/** |
67
|
|
|
* @return array|null |
68
|
|
|
*/ |
69
|
|
|
public function getGroupsRead() |
70
|
|
|
{ |
71
|
|
|
$permHelper = new \Xmf\Module\Helper\Permission(); |
72
|
|
|
//return $this->publisher->getHandler('permission')->getGrantedGroupsById('category_read', id); |
73
|
|
|
return $permHelper->getGroupsForItem('sbcolumns_read', $this->getVar('category_id')); |
74
|
|
|
} |
75
|
|
|
|
76
|
|
|
/** |
77
|
|
|
* @return array|null |
78
|
|
|
*/ |
79
|
|
|
public function getGroupsSubmit() |
80
|
|
|
{ |
81
|
|
|
$permHelper = new \Xmf\Module\Helper\Permission(); |
82
|
|
|
// return $this->publisher->getHandler('permission')->getGrantedGroupsById('category_submit', id); |
83
|
|
|
return $permHelper->getGroupsForItem('sbcolumns_submit', $this->getVar('category_id')); |
84
|
|
|
} |
85
|
|
|
|
86
|
|
|
/** |
87
|
|
|
* @return array|null |
88
|
|
|
*/ |
89
|
|
|
public function getGroupsModeration() |
90
|
|
|
{ |
91
|
|
|
$permHelper = new \Xmf\Module\Helper\Permission(); |
92
|
|
|
// return $this->publisher->getHandler('permission')->getGrantedGroupsById('category_moderation', id); |
93
|
|
|
return $permHelper->getGroupsForItem('sbcolumns_moderation', $this->getVar('category_id')); |
94
|
|
|
} |
95
|
|
|
} |
96
|
|
|
|
97
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths