Upgrade to 3.0.2
This commit is contained in:
@@ -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'));
|
||||
}
|
||||
|
Reference in New Issue
Block a user