getGroupTree() public méthode

Get the group tree
public getGroupTree ( integer $parent, string $column = 'children', array $seen = [] ) : array
$parent integer
$column string What to call the child element?
$seen array
Résultat array
Exemple #1
0
 /**
  * @route admin/settings
  */
 public function manageSettings()
 {
     $state = State::instance();
     $settings = ['universal' => $state->universal];
     $post = $this->post(new SettingsFilter());
     if (!empty($post)) {
         if ($this->saveSettings($post)) {
             \Airship\clear_cache();
             \Airship\redirect($this->airship_cabin_prefix . '/admin/settings', ['msg' => 'saved']);
         } else {
             $this->log('Could not save new settings', LogLevel::ALERT);
         }
     }
     // Load individual files...
     $settings['cabins'] = $this->loadJSONConfigFile('cabins.json');
     $settings['content_security_policy'] = $this->loadJSONConfigFile('content_security_policy.json');
     $settings['keyring'] = $this->loadJSONConfigFile('keyring.json');
     foreach (\Airship\list_all_files(ROOT . '/config/supplier_keys/', 'json') as $supplier) {
         $name = \Airship\path_to_filename($supplier, true);
         $settings['suppliers'][$name] = \Airship\loadJSON($supplier);
     }
     $this->lens('admin_settings', ['active_link' => 'bridge-link-admin-settings', 'config' => $settings, 'groups' => $this->acct->getGroupTree()]);
 }
Exemple #2
0
 /**
  * List the groups
  *
  * @route crew/groups
  */
 public function groups()
 {
     $this->lens('crew/group_list', ['active_link' => 'bridge-link-admin-crew-groups', 'groups' => $this->account->getGroupTree()]);
 }