summaryrefslogtreecommitdiff
path: root/providers
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2024-11-25 23:27:13 +0100
committeremkael <emkael@tlen.pl>2024-11-25 23:27:13 +0100
commit8608dc8151440f109e2a48036fd508fe031d6bbc (patch)
treed58ba713c81a1dd181f53e92d4da1ffd961ee02a /providers
parent721bcc4f25a491f3877f05d202ceb5c04973157b (diff)
Ability to filter by title string
Diffstat (limited to 'providers')
-rw-r--r--providers/Provider.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/providers/Provider.php b/providers/Provider.php
index 7e7dbf0..fe2195c 100644
--- a/providers/Provider.php
+++ b/providers/Provider.php
@@ -54,6 +54,12 @@ abstract class Provider {
}
}
}
+ if (array_key_exists('title', $this->_options)) {
+ $keyword = strtolower($this->_options['title']);
+ $items = array_filter($items, function($item) use($keyword) {
+ return str_contains(strtolower($item->Title), $keyword);
+ });
+ }
return $items;
}