Skip to content

Commit

Permalink
Add filtering by site label.
Browse files Browse the repository at this point in the history
  • Loading branch information
vinmassaro committed Jan 15, 2025
1 parent 5bcf557 commit 9d2aaba
Showing 1 changed file with 13 additions and 0 deletions.
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

0 comments on commit 9d2aaba

Please sign in to comment.