Upgrade to 3.0.2

This commit is contained in:
Bastian Allgeier
2019-02-19 16:39:58 +01:00
parent f76ee1bb14
commit 8e3d86a590
44 changed files with 638 additions and 264 deletions

View File

@@ -608,10 +608,19 @@ class Page extends ModelWithContent
/**
* Checks if the page is a descendant of the given page
*
* @param string|Page $parent
* @return boolean
*/
public function isDescendantOf(Page $parent): bool
public function isDescendantOf($parent): bool
{
if (is_string($parent) === true) {
$parent = $this->site()->find($parent);
}
if (!$parent) {
return false;
}
return $this->parents()->has($parent->id()) === true;
}
@@ -828,7 +837,7 @@ class Page extends ModelWithContent
* @param string|null $handler
* @return int|string
*/
public function modified(string $format = 'U', string $handler = null)
public function modified(string $format = null, string $handler = null)
{
return F::modified($this->contentFile(), $format, $handler ?? $this->kirby()->option('date.handler', 'date'));
}