1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-08 06:06:45 +02:00

feat(fields): Add new field entries.fetch for Entries API #492

This commit is contained in:
Awilum
2020-12-17 16:51:02 +03:00
parent 6d3e6a3a72
commit 2883502c0e

View File

@@ -7,8 +7,9 @@ declare(strict_types=1);
* Founded by Sergey Romanenko and maintained by Flextype Community.
*/
use Atomastic\Arrays\Arrays;
if (flextype('registry')->get('flextype.settings.entries.fields.entries.fetch.enabled')) {
if (flextype('registry')->get('flextype.settings.entries.fields.entries.fetch.enabled')) {
flextype('emitter')->addListener('onEntriesFetchSingleHasResult', static function (): void {
if (flextype('entries')->hasStorage('fetch.data.entries.fetch')) {
// Get fetch.
@@ -53,4 +54,4 @@ declare(strict_types=1);
flextype('entries')->setStorage('fetch.data', arrays($original['data'])->merge($data)->toArray());
}
});
}
}