Checks wether this element is contained by an union parent or not
@return bool
502097
public function hasUnionParent()
    {
        return $this->getSuitableParent(false, [
            AbstractDocument::TAG_UNION,
        ], self::MAX_DEEP, true) instanceof TagUnion;
    }
2876
public function clearInvalidParent()
    {
        if ($this->getParentId() !== static::$nullParent && !$this->hasParent()) {
            $this->setNullParent();
            return true;
        }
        return false;
    }
423089
public function isVoided()
    {
        if ($this->parent) {
            return $this->parent->isVoided();
        }

        return $this->children->exists(function($key, Transaction $child) {
            return $child->getType() == Transaction\TransactionType::VOID && $child->getStatus() == Result\ResultStatus::APPROVED;
        });
    }
784713
public function has_children() {
        return ($this->nodetype === navigation_node::NODETYPE_BRANCH || $this->children->count()>0 || $this->isexpandable);
    }
507974
public function has_siblings() {
        if (empty($this->parent) || empty($this->parent->children)) {
            return false;
        }
        if ($this->parent->children instanceof navigation_node_collection) {
            $count = $this->parent->children->count();
        } else {
            $count = count($this->parent->children);
        }
        return ($count > 1);
    }
1111272
public boolean parent() {
        if (mNode == null) {
            return false;
        }
        AccessibilityNodeInfoCompat parentNode = mNode.getParent();
        while (parentNode != null) {
            if (AccessibilityNodeInfoUtils.isVisibleOrLegacy(parentNode)) {
                reset(parentNode);
                return true;
            }
            AccessibilityNodeInfoCompat tmp = parentNode.getParent();
            parentNode.recycle();
            parentNode = tmp;
        }
        return false;
    }
369532
protected function isDeclaration(ParentNode $node) {
    return $node instanceof FunctionDeclarationNode ||
      $node instanceof SingleInheritanceNode ||
      $node instanceof InterfaceNode ||
      $node instanceof ClassMethodNode ||
      $node instanceof InterfaceMethodNode;
  }
320745
public function isVariant(): bool
    {
        $isVariant = false;
        if (isset($this->oxarticles__oxparentid) && false !== $this->oxarticles__oxparentid) {
            $isVariant = (bool) $this->oxarticles__oxparentid->value;
        }

        return $isVariant;
    }
233672
public function is(Hierarchy $element)
    {
        if (get_class($this) !== get_class($element))
            return false;
        return $this->id === $element->id;
    }
474686
function isParent(possibleParent, elem) {
    if(!elem || elem.nodeName === 'HTML') {
      return false;
    }

    if(elem.parentNode === possibleParent) {
      return true;
    }

    return isParent(possibleParent, elem.parentNode);
  }
794526
public function hasDeterminedParent()
    {
        // There is more than 1 fight, should be Preliminary
        if (count($this->fighters()) > 1) {
            return false;
        }
        foreach ($this->children as $child) {
            if (count($child->fighters()) > 1) {
                return false;
            }
        }

        return true;
    }
745982
public function contains($element)
    {
        $hash = $this->hash($element);
        return isset($this->hashTable[$hash])
               && in_array($element, $this->hashTable[$hash], true);
    }
454260
public function hasVisibleChildren()
    {
        if (is_array($this->children) && count($this->children)) {
            foreach ($this->children as $child) {
                if (!$child->isHidden()) {
                    return true;
                }
            }
        }

        return false;
    }
791918
protected function isNewVariant()
    {
        $bIsNewVariant = false;
        if (!is_null($this->sRestriction) && !is_null($this->sRestrictionField) && '_id' == substr($this->sRestrictionField, -3)) {
            if ('variant_parent_id' == $this->sRestrictionField) {
                $bIsNewVariant = true;
            }
        }

        return $bIsNewVariant;
    }
50833
public function containsAll($elements)
    {
        foreach ($elements as $element) {
            if (false === $this->contains($element)) {
                return false;
            }
        }

        return true;
    }
404975
public function shouldHide()
    {
        if (!$this->hideWhenEmpty) {
            return false;
        }
        
        foreach ($this->children as $child) {
            if (!$child->shouldHide()) {
                return false;
            }
        }
        
        return true;
    }
700603
public function hasRealContent()
    {
        if (count($this->contentAttributes) > 0) return true;

        foreach ($this->childNodes as $node) {
            if (!$node instanceof PHPTAL_Dom_Text || $node->getValueEscaped() !== '') return true;
        }
        return false;
    }