Upgrade to 4.1.0
This commit is contained in:
@@ -147,7 +147,6 @@ class Pages extends Collection
|
||||
): static {
|
||||
$model ??= App::instance()->site();
|
||||
$children = new static([], $model);
|
||||
$kirby = $model->kirby();
|
||||
|
||||
if ($model instanceof Page) {
|
||||
$parent = $model;
|
||||
@@ -158,7 +157,6 @@ class Pages extends Collection
|
||||
}
|
||||
|
||||
foreach ($pages as $props) {
|
||||
$props['kirby'] = $kirby;
|
||||
$props['parent'] = $parent;
|
||||
$props['site'] = $site;
|
||||
$props['isDraft'] = $draft ?? $props['isDraft'] ?? $props['draft'] ?? false;
|
||||
@@ -445,9 +443,10 @@ class Pages extends Collection
|
||||
$templates = [$templates];
|
||||
}
|
||||
|
||||
return $this->filter(function ($page) use ($templates) {
|
||||
return !in_array($page->intendedTemplate()->name(), $templates);
|
||||
});
|
||||
return $this->filter(
|
||||
fn ($page) =>
|
||||
!in_array($page->intendedTemplate()->name(), $templates)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -480,9 +479,10 @@ class Pages extends Collection
|
||||
$templates = [$templates];
|
||||
}
|
||||
|
||||
return $this->filter(function ($page) use ($templates) {
|
||||
return in_array($page->intendedTemplate()->name(), $templates);
|
||||
});
|
||||
return $this->filter(
|
||||
fn ($page) =>
|
||||
in_array($page->intendedTemplate()->name(), $templates)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user