public listOrgs ( ) : Consolidation\OutputFormatters\StructuredData\RowsOfFields | ||
return | Consolidation\OutputFormatters\StructuredData\RowsOfFields |
public function listOrgs()
{
$orgs = array_map(function ($org) {
return $org->serialize();
}, $this->session()->getUser()->getOrganizations());
if (empty($orgs)) {
$this->log()->warning('You are not a member of any organizations.');
}
return new RowsOfFields($orgs);
}