aboutsummaryrefslogtreecommitdiff
path: root/lib/classes/StudipArrayObject.class.php
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+studip@gmail.com>2022-11-24 10:29:24 +0000
committerJan-Hendrik Willms <tleilax+studip@gmail.com>2022-11-24 10:29:24 +0000
commit7dddea8ccca601bf2da28960f2e27a223fe60ea6 (patch)
treeb34ee92f9a4e0e4c1f7e4dcf5f15b396f9097d6f /lib/classes/StudipArrayObject.class.php
parent1231022837beceedef376e4bb8084ff38fbc7d93 (diff)
rework aux lock rules, use sorm model, deprecate old class and let name and description be translatable, fixes #1791
Closes #1791 Merge request studip/studip!1177
Diffstat (limited to 'lib/classes/StudipArrayObject.class.php')
-rw-r--r--lib/classes/StudipArrayObject.class.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/classes/StudipArrayObject.class.php b/lib/classes/StudipArrayObject.class.php
index bb5444c..f025ffb 100644
--- a/lib/classes/StudipArrayObject.class.php
+++ b/lib/classes/StudipArrayObject.class.php
@@ -436,4 +436,12 @@ class StudipArrayObject implements IteratorAggregate, ArrayAccess, Serializable,
throw new InvalidArgumentException("{$key} is a protected property, use a different key");
}
}
+
+ /**
+ * Returns whether the given value is in the underlying array.
+ */
+ public function contains($value): bool
+ {
+ return in_array($value, $this->storage);
+ }
}