original_string: 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);
      }
code: 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);
      }
code_tokens: 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 ) ; }
docstring: 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.
docstring_tokens: Gets and Sets the parent object for this page