This commit is contained in:
Bastian Allgeier
2020-07-07 12:40:13 +02:00
parent 5f025ac2c2
commit f79d2e960c
176 changed files with 10532 additions and 5343 deletions

View File

@@ -4,6 +4,7 @@ namespace Kirby\Cms;
use Kirby\Exception\NotFoundException;
use Kirby\Toolkit\Controller;
use Kirby\Toolkit\F;
/**
* Manages and loads all collections
@@ -119,8 +120,8 @@ class Collections
// first check for collection file
$file = $kirby->root('collections') . '/' . $name . '.php';
if (file_exists($file)) {
$collection = require $file;
if (is_file($file) === true) {
$collection = F::load($file);
if (is_a($collection, 'Closure')) {
return $collection;