|
@@ -2,9 +2,11 @@
|
2
|
2
|
|
3
|
3
|
namespace Luticate\Auth\Business;
|
4
|
4
|
|
|
5
|
+use Luticate\Auth\DBO\LuticatePermissionsDbo;
|
5
|
6
|
use Luticate\Utils\LuBusiness;
|
6
|
7
|
use Luticate\Auth\DataAccess\LuticatePermissionsGroupsDataAccess;
|
7
|
8
|
use Luticate\Auth\DBO\LuticatePermissionsGroupsDbo;
|
|
9
|
+use Luticate\Utils\LuMultipleDbo;
|
8
|
10
|
|
9
|
11
|
class LuticatePermissionsGroupsBusiness extends LuBusiness {
|
10
|
12
|
protected static function getDataAccess()
|
|
@@ -19,6 +21,19 @@ class LuticatePermissionsGroupsBusiness extends LuBusiness {
|
19
|
21
|
return LuticatePermissionsGroupsDataAccess::getByName($group_id, $permission_name);
|
20
|
22
|
}
|
21
|
23
|
|
|
24
|
+ public static function getAllByGroup($group_id, $page = 0, $perPage = PHP_INT_MAX)
|
|
25
|
+ {
|
|
26
|
+ $values = LuticatePermissionsGroupsDataAccess::getAllByGroup($group_id, $page, $perPage);
|
|
27
|
+ $dbos = [];
|
|
28
|
+ foreach ($values->getData() as $value) {
|
|
29
|
+ $dbo = new LuticatePermissionsDbo();
|
|
30
|
+ $dbo->setValue($value->getValue());
|
|
31
|
+ $dbo->setName($value->getName());
|
|
32
|
+ $dbos[] = $dbo;
|
|
33
|
+ }
|
|
34
|
+ return new LuMultipleDbo($values->getCount(), $dbos);
|
|
35
|
+ }
|
|
36
|
+
|
22
|
37
|
public static function get($group_id, $permission_name)
|
23
|
38
|
{
|
24
|
39
|
$perm = self::checkPermissionGroupName($group_id, $permission_name);
|