public function parent(PageInterface $var = null)
    {
        if ($var) {
            $this->parent = $var->path();

            return $var;
        }

        /** @var Pages $pages */
        $pages = Grav::instance()['pages'];

        return $pages->get($this->parent);
    }
public function parent(PageInterface $var = null)
    {
        if ($var) {
            $this->parent = $var->path();

            return $var;
        }

        /** @var Pages $pages */
        $pages = Grav::instance()['pages'];

        return $pages->get($this->parent);
    }
public function parent ( PageInterface $ var = null ) { if ( $ var ) { $ this -> parent = $ var -> path ( ) ; return $ var ; } /** @var Pages $pages */ $ pages = Grav :: instance ( ) [ 'pages' ] ; return $ pages -> get ( $ this -> parent ) ; }
Gets and Sets the parent object for this page

@param  PageInterface $var the parent page object

@return PageInterface|null the parent page object if it exists.
Gets and Sets the parent object for this page