hasParent method

This commit is contained in:
floppy0 2017-12-19 16:00:48 +01:00
parent 7a3cb64a0f
commit 7ed517fca1
1 changed files with 6 additions and 0 deletions

View File

@ -417,6 +417,12 @@ class Page {
return false; return false;
} }
// Returns TURE if the page has a parent, FALSE otherwise
public function hasParent()
{
return $this->parentKey()!==false;
}
// Returns the parent method output, if the page doesn't have a parent returns FALSE // Returns the parent method output, if the page doesn't have a parent returns FALSE
public function parentMethod($method) public function parentMethod($method)
{ {