Skip to content

Commit 9d2aaba

Browse files
committed
Add filtering by site label.
1 parent 5bcf557 commit 9d2aaba

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/Collections/Sites.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,19 @@ public function filterByName($regex = '(.*)')
137137
return $this->filterByRegex('name', $regex);
138138
}
139139

140+
/**
141+
* Filters the members of this collection by their label.
142+
*
143+
* @param string $regex
144+
* Non-delimited PHP regex to filter site names by
145+
*
146+
* @return Sites
147+
*/
148+
public function filterByLabel($regex = '(.*)')
149+
{
150+
return $this->filterByRegex('label', $regex);
151+
}
152+
140153
/**
141154
* Filters an array of sites by the plan name.
142155
*

0 commit comments

Comments
 (0)