Back to ImmutableNodeTrait class

Method hasParent

public bool
hasParent
()
Test if this node has a parent
Returns
  • bool True if there is a parent
Since
  • 4.0.0

Method hasParent - Source code

/**
 * Test if this node has a parent
 *
 * @return  boolean  True if there is a parent
 *
 * @since   4.0.0
 */
public function hasParent()
{
    return $this->getParent() != null;
}