public function get($itemsToGet = 0, $offset = 0) { $r = parent::get($itemsToGet, $offset); $groupsets = array(); foreach ($r as $row) { $groupsets[] = GroupSet::getByID($row['gsID']); } return $groupsets; }
public function get() { $r = parent::get(0, 0); $groupsets = array(); foreach ($r as $row) { $groupsets[] = GroupSet::getByID($row['gsID']); } return $groupsets; }
public function load() { $db = Loader::db(); $gsID = $db->GetOne('select gsID from PermissionAccessEntityGroupSets where peID = ?', array($this->peID)); if ($gsID) { $gs = GroupSet::getByID($gsID); if (is_object($gs)) { $this->groupset = $gs; $this->label = $gs->getGroupSetDisplayName(); } } }
/** * @param UserList $list * @param $request */ public function filterList(ItemList $list) { $gsID = $this->data['gsID']; $gs = GroupSet::getByID($gsID); $groupsetids = array(-1); if (is_object($gs)) { $groups = $gs->getGroups(); } $list->addToQuery('left join UserGroups ugs on u.uID = ugs.uID'); $pk = Key::getByHandle('search_users_in_group'); foreach ($groups as $g) { if ($pk->validate($g) && !in_array($g->getGroupID(), $groupsetids)) { $groupsetids[] = $g->getGroupID(); } } $instr = 'ugs.gID in (' . implode(',', $groupsetids) . ')'; $list->filter(false, $instr); }
public function edit($gsID = false) { $gs = GroupSet::getByID($gsID); if (is_object($gs)) { $this->set('set', $gs); } else { $this->redirect('/dashboard/users/group_sets'); } }
public static function add($gsName, $pkg = false) { $db = Loader::db(); $pkgID = 0; if (is_object($pkg)) { $pkgID = $pkg->getPackageID(); } $db->Execute('insert into GroupSets (gsName, pkgID) values (?,?)', array($gsName, $pkgID)); $id = $db->Insert_ID(); $gs = GroupSet::getByID($id); return $gs; }
public function getPackageItems(Package $package) { return \Concrete\Core\User\Group\GroupSet::getListByPackage($package); }
public function setPropertiesFromArray($arr) { return parent::setPropertiesFromArray($arr); }