1 | <?php |
||
12 | class groups |
||
13 | { |
||
14 | /** @var \phpbb\db\driver\driver_interface */ |
||
15 | protected $db; |
||
16 | |||
17 | /** @var \phpbb\user */ |
||
18 | protected $user; |
||
19 | |||
20 | /** |
||
21 | * Constructor |
||
22 | * |
||
23 | * @param \phpbb\db\driver\driver_interface $db Database connection |
||
24 | * @param \phpbb\user $user User object |
||
25 | */ |
||
26 | 8 | public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\user $user) |
|
31 | |||
32 | /** |
||
33 | * @return array |
||
34 | */ |
||
35 | 3 | public function get_users_groups() |
|
51 | |||
52 | /** |
||
53 | * @param string $mode (all|special) |
||
54 | * @return array |
||
55 | */ |
||
56 | 2 | public function get_data($mode = 'all') |
|
70 | |||
71 | /** |
||
72 | * @param string $mode (all|special) |
||
73 | * @param array $selected |
||
74 | * @return string |
||
75 | */ |
||
76 | 3 | public function get_options($mode = 'all', array $selected = array()) |
|
93 | |||
94 | /** |
||
95 | * @param string $mode (all|special) |
||
96 | * @return string |
||
97 | */ |
||
98 | 5 | private function _get_group_sql($mode) |
|
105 | |||
106 | /** |
||
107 | * @param array $row |
||
108 | * @return mixed|string |
||
109 | */ |
||
110 | 5 | private function _get_group_name(array $row) |
|
114 | |||
115 | /** |
||
116 | * @param int $group_type |
||
117 | * @return string |
||
118 | */ |
||
119 | 3 | private function _get_group_class($group_type) |
|
123 | |||
124 | /** |
||
125 | * @param int $group_id |
||
126 | * @param array $selected_options |
||
127 | * @return string |
||
128 | */ |
||
129 | 3 | private function _get_selected_option($group_id, $selected_options) |
|
133 | } |
||
134 |