Ejemplo n.º 1
0
 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');
 }
Ejemplo n.º 2
0
 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());
 }
Ejemplo n.º 3
0
 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());
     }
 }
Ejemplo n.º 4
0
 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());
     }
 }
Ejemplo n.º 5
0
 public function view()
 {
     $tree = GroupTree::get();
     $this->set('tree', $tree);
     $this->requireAsset('core/groups');
 }