Updated API, store current filter value

This commit is contained in:
markseu 2022-04-25 13:46:54 +02:00
parent a9e1240a03
commit be57613d7e
2 changed files with 4 additions and 3 deletions

View file

@ -2,7 +2,7 @@
// Core extension, https://github.com/datenstrom/yellow-extensions/tree/master/source/core
class YellowCore {
const VERSION = "0.8.72";
const VERSION = "0.8.73";
const RELEASE = "0.8.19";
public $page; // current page
public $content; // content files
@ -1008,6 +1008,7 @@ class YellowPageCollection extends ArrayObject {
// Filter page collection by location or file
public function match($regex = "/.*/", $filterByLocation = true) {
$array = array();
$this->filterValue = $regex;
foreach ($this->getArrayCopy() as $page) {
if (preg_match($regex, $filterByLocation ? $page->location : $page->fileName)) array_push($array, $page);
}

View file

@ -21,11 +21,11 @@ Tag: feature
system/extensions/command.php: command.php, create, update
Extension: Core
Version: 0.8.72
Version: 0.8.73
Description: Core functionality of the website.
DocumentationUrl: https://github.com/datenstrom/yellow-extensions/tree/master/source/core
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/master/zip/core.zip
Published: 2022-04-20 22:34:35
Published: 2022-04-25 13:22:21
Developer: Datenstrom
Tag: feature
system/extensions/core.php: core.php, create, update