Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/Collections/Sites.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,19 @@ public function filterByName($regex = '(.*)')
return $this->filterByRegex('name', $regex);
}

/**
* Filters the members of this collection by their label.
*
* @param string $regex
* Non-delimited PHP regex to filter site names by
*
* @return Sites
*/
public function filterByLabel($regex = '(.*)')
{
return $this->filterByRegex('label', $regex);
}

/**
* Filters an array of sites by the plan name.
*
Expand Down
2 changes: 2 additions & 0 deletions src/Commands/Org/Site/ListCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,15 @@ class ListCommand extends TerminusCommand implements SiteAwareInterface
*
* @field-labels
* name: Name
* label: Label
* id: ID
* plan_name: Plan
* framework: Framework
* owner: Owner
* created: Created
* tags: Tags
* frozen: Is Frozen?
* @default-fields name,id,plan_name,framework,owner,created,tags,frozen
* @return RowsOfFields
*
* @param string $organization Organization name, label, or ID
Expand Down
1 change: 1 addition & 0 deletions src/Commands/Site/ListCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class ListCommand extends SiteCommand
*
* @field-labels
* name: Name
* label: Label
* id: ID
* plan_name: Plan
* framework: Framework
Expand Down
Loading