1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-10 23:24:04 +02:00

feat(entries): Entries API fetch improvements. #491

This commit is contained in:
Awilum
2020-12-13 11:33:42 +03:00
parent b6cbd2004b
commit c49f7d0797

View File

@@ -197,8 +197,8 @@ class Entries
// Find entries in the filesystem
$entries = find($this->getDirectoryLocation($this->storage['fetch_collection']['id']),
isset($this->storage['fetch_collection']['options']['find']) ?
$this->storage['fetch_collection']['options']['find'] :
[]);
$this->storage['fetch_collection']['options']['find'] :
[]);
// Walk through entries results
if ($entries->hasResults()) {
@@ -224,8 +224,10 @@ class Entries
// Apply filter for fetch data
$this->storage['fetch_collection']['data'] = filter($this->storage['fetch_collection']['data'],
isset($this->storage['fetch_collection']['options']['filter']) ?
$this->storage['fetch_collection']['options']['filter'] :
[]);
$this->storage['fetch_collection']['options']['filter'] :
isset($options['filter']) ? $options['filter'] : []);
}