/*
Called for each element to test whether it has children.

@return bool TRUE if the element has children, otherwise FALSE
979527
public function callHasChildren()
    {
        $result = false;

        if($this->current()->isRecursable()) {
            $result = $this->current()->hasChildren();
        }

        return $result;
    }
983866
@Pure
	public boolean hasChild(N potentialChild) {
		if ((this.left == potentialChild) || (this.middle == potentialChild) || (this.right == potentialChild)) {
			return true;
		}
		return false;
	}
31509
public function IsContextSensitive()
	{
		if ( ! is_null( $this->_childs ) )
		{
			foreach ( $this->_childs as $node )
			{
				if ( $node->IsContextSensitive() )
				{
					return true;
				}
			}
		}

		return false;
	}
346085
public function hasSharedParent()
    {
        $parent = $this->getParent();

        if ($parent != null && ($parent->isShared() || $parent->hasSharedParent())) {
            return true;
        }

        return false;
    }
241317
public boolean hasChild(String child)
    {
        final NodeList list = root.getChildNodes();
        for (int i = 0; i < list.getLength(); i++)
        {
            final Node node = list.item(i);
            if (node.getNodeName().equals(child))
            {
                return true;
            }
        }
        return false;
    }
727966
public function isWood()
	{
		if( !$this->hasCycle() )
		{
			$nodes = $this->getNodes();
			foreach( $nodes as $targetSource )
				foreach( $nodes as $source )
					if( $source != $targetSource )
						if( $this->getEntranceGrade( $source, $targetSource ) > 1 )
							return false;
			return true;
		}
		else return false;
	}
23358
public function has_items() {
        if ($this->duringinstall) {
            return false;
        } else if ($this->hasitems !== false) {
            return true;
        }
        if (count($this->children) > 0 || count($this->prependchildren) > 0) {
            // There have been manually added items - there are definitely items.
            $outcome = true;
        } else if (!$this->ignoreactive) {
            // We will need to initialise the navigation structure to check if there are active items.
            $this->page->navigation->initialise($this->page);
            $outcome = ($this->page->navigation->contains_active_node() || $this->page->settingsnav->contains_active_node());
        }
        $this->hasitems = $outcome;
        return $outcome;
    }
882308
public function contains_active_node() {
        if ($this->isactive) {
            return true;
        } else {
            foreach ($this->children as $child) {
                if ($child->isactive || $child->contains_active_node()) {
                    return true;
                }
            }
        }
        return false;
    }
32781
public static boolean hasChildren(final Element el) throws SAXException {
    NodeList children = el.getChildNodes();

    for (int i = 0; i < children.getLength(); i++) {
      Node curnode = children.item(i);

      short ntype =  curnode.getNodeType();
      if ((ntype != Node.TEXT_NODE) &&
          (ntype != Node.CDATA_SECTION_NODE) &&
          (ntype != Node.COMMENT_NODE)) {
        return true;
      }
    }

    return false;
  }
236516
private boolean hasFallbackChildren()
  {
    for (ElemTemplateElement child = m_firstChild; child != null;
             child = child.m_nextSibling)
    {
      if (child.getXSLToken() == Constants.ELEMNAME_FALLBACK)
        return true;
    }
    
    return false;
  }
982113
private Boolean hasChildNodes(Node n) {
        boolean flag = n.hasChildNodes();
        if (flag && XMLUnit.getIgnoreComments()) {
            List nl = nodeList2List(n.getChildNodes());
            flag = !nl.isEmpty();
        }
        return flag ? Boolean.TRUE : Boolean.FALSE;
    }
1309782
public boolean hasChild(String name) {
	for (ParseTreeNode child : children) {
	    if (child.getName().equals(name)) {
		return true;
	    }
	}
	return false;
    }
1181030
public function hasChildren(): bool
    {
        $children = (($this->getRgt() - $this->getLft()) - 1) / 2;
        return (0 === $children) ? false : true;
    }
856484
public function dataValid()
    {
        foreach (new \RecursiveIteratorIterator($this,
                                                \RecursiveIteratorIterator::SELF_FIRST) as $child) {
            if ($child instanceof FormElement && !$child->dataValid()) {
                return false;
            }
        }

        return true;
    }
1374287
public function containsChildrenEntities(array $childrenEntities)
    {
        foreach ($childrenEntities as $childrenEntity) {
            if (!$this->childrenEntities->contains($childrenEntity)) {
                return false;
            }
        }

        return true;
    }
252107
function _hasChildren(content) {
    if (!content) return false;
    if (typeof content === 'object') return true;
    if (Array.isArray(content) && content.every(item => typeof item === 'string')) return false;
    return false;
}
553342
public function hasTabs(): bool
    {
        if ( ! $this->layout || ! count($this->layout)) {
            return false;
        }

        foreach ($this->layout as $key => $value) {

            if ($value instanceof ModelFormTabDataInterface) {
                return true;
            }
        }

        return false;
    }