aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Accounts/AccountPropertyCollection.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Accounts/AccountPropertyCollection.php')
-rw-r--r--lib/private/Accounts/AccountPropertyCollection.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/private/Accounts/AccountPropertyCollection.php b/lib/private/Accounts/AccountPropertyCollection.php
index eb92536a6a0..3aed76d8746 100644
--- a/lib/private/Accounts/AccountPropertyCollection.php
+++ b/lib/private/Accounts/AccountPropertyCollection.php
@@ -84,6 +84,15 @@ class AccountPropertyCollection implements IAccountPropertyCollection {
return $this;
}
+ public function getPropertyByValue(string $value): ?IAccountProperty {
+ foreach ($this->properties as $i => $property) {
+ if ($property->getValue() === $value) {
+ return $property;
+ }
+ }
+ return null;
+ }
+
public function removePropertyByValue(string $value): IAccountPropertyCollection {
foreach ($this->properties as $i => $property) {
if ($property->getValue() === $value) {