Exemple #1
0
 /**
  * Show a list of your organizations on Pantheon
  *
  * @subcommand list
  *
  */
 public function all($args, $assoc_args)
 {
     $user = new User(new stdClass(), array());
     $data = array();
     foreach ($user->getOrganizations() as $id => $org) {
         $data[] = array('name' => $org->get('name'), 'id' => $org->get('id'));
     }
     $this->output()->outputRecordList($data);
 }
Exemple #2
0
 /**
  * Show a list of your organizations on Pantheon
  *
  * @subcommand list
  */
 public function all($args, $assoc_args)
 {
     $user = new User();
     $data = array();
     foreach ($user->getOrganizations() as $id => $org) {
         $org_data = $org->get('organization');
         $data[] = array('name' => $org_data->profile->name, 'id' => $org->get('id'));
     }
     $this->output()->outputRecordList($data);
 }
Exemple #3
0
 /**
  * Returns an array listing organizaitions applicable to user
  *
  * @return [array] List of organizations
  */
 public static function orglist($options = array())
 {
     $orgs = array();
     $allow_none = isset($options['allow_none']) ? $options['allow_none'] : true;
     if ($allow_none) {
         $orgs = array('-' => 'None');
     }
     $user = new User();
     foreach ($user->getOrganizations() as $id => $org) {
         $orgs[$org->get('id')] = $org->get('name');
     }
     return $orgs;
 }