public function view() { $cnt = new SearchGroupsController(); $cnt->search(); $result = Loader::helper('json')->encode($cnt->getSearchResultObject()->getJSONObject()); $this->set('result', $result); $this->set('searchController', $cnt); $this->set('tree', GroupTree::get()); $this->requireAsset('core/groups'); }
public function view() { $tree = GroupTree::get(); $this->set('tree', $tree); $this->requireAsset('core/groups'); $cnt = new SearchGroupsController(); $cnt->search(); $this->set('searchController', $cnt); $c = Page::getByPath('/dashboard/users/add_group'); $cp = new Permissions($c); $this->set('canAddGroup', $cp->canViewPage()); }
public function search() { $this->requireAsset('core/groups'); $tree = GroupTree::get(); $this->set("tree", $tree); $gName = Loader::helper('security')->sanitizeString($_REQUEST['gName']); if (!$gName) { $this->error->add(t('You must specify a search string.')); } if (!$this->error->has()) { $gl = new GroupList(); $gl->filterByKeywords($gName); $this->set('groups', $gl->getResults()); } }
public function search() { $this->requireAsset('core/groups'); $tree = GroupTree::get(); $this->set("tree", $tree); $gName = (string) $this->app->make('helper/security')->sanitizeString($this->request('gName')); if ($gName === '') { $this->error->add(t('You must specify a search string.')); } if (!$this->error->has()) { $gl = $this->app->make(GroupList::class); $gl->filterByKeywords($gName); $this->set('groups', $gl->getResults()); } }
public function view() { $tree = GroupTree::get(); $this->set('tree', $tree); $this->requireAsset('core/groups'); }