/** * 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); }
/** * 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); }
/** * 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; }