Test whether all branches of current xsl:choose element share a common firstChild/lastChild

@param  string $childType Either firstChild or lastChild
@return bool
967918
protected function matchBranches($childType)
	{
		$branches = $this->getBranches();
		if (!isset($branches[0]->$childType))
		{
			return false;
		}

		$childNode = $branches[0]->$childType;
		foreach ($branches as $branch)
		{
			if (!isset($branch->$childType) || !$this->isEqualNode($childNode, $branch->$childType))
			{
				return false;
			}
		}

		return true;
	}
784713
public function has_children() {
        return ($this->nodetype === navigation_node::NODETYPE_BRANCH || $this->children->count()>0 || $this->isexpandable);
    }
954482
public static boolean hasChildsOf(final Element parentElement, XsdElementEnum child) {
        NodeList nodeList = parentElement.getChildNodes();
        for (int i = 0; i < nodeList.getLength(); i++) {
            final Node childNode = nodeList.item(i);
            if (childNode.getNodeType() == Node.ELEMENT_NODE) {
                final Element childElement = (Element) childNode;
                if (child.isTagNameEqual(childElement.getTagName())) {
                    return true;
                }

                if (childElement.hasChildNodes()) {
                    if (hasChildsOf(childElement, child)) {
                        return true;
                    }
                }
            }
        }
        return false;
    }
444155
public function findAllowedChildren(Elementtype $elementtype)
    {
        $viabilityRepository = $this->entityManager->getRepository('PhlexibleElementtypeBundle:ElementtypeApply');

        return $viabilityRepository->findBy(['underElementtypeId' => $elementtype->getId()]);
    }
1160186
public function render_child_type( $type ) {

		$output = null;
		if ( ! empty( $this->child ) ) {
			foreach ( $this->child as $child ) {
				if ( $type === $child->type ) {
					$output .= $child->render();
				}
			}
		}

		return $output;

	}
202832
public final boolean hasChild(Node child) {
    for (Node n = first; n != null; n = n.next) {
      if (child == n) {
        return true;
      }
    }
    return false;
  }
1181030
public function hasChildren(): bool
    {
        $children = (($this->getRgt() - $this->getLft()) - 1) / 2;
        return (0 === $children) ? false : true;
    }
677408
protected function buildSelect($fieldType)
    {
        $this->children[] = new $fieldType(
            $this->name,
            $this->choiceType,
            $this->parent,
            $this->formHelper->mergeOptions($this->options, ['is_child' => true])
        );
    }
499218
function appendChild(&$child) {
             
            // Set child's parentNode
            $child->parentNode = & $this;
             
            // Add child to list of childNodes
            $this->childNodes[] = & $child;
             
            // Is child of type node?
            if ($child->nodeType == XML_TYPE_NODE) {
                 
                // Set child's previousSibling
                $child->previousSibling = & $this->lastChild;
            }
             
            // Is this node of type node?
            if ($this->nodeType != null && $this->nodeType == XML_TYPE_NODE) {
                 
                // Set current lastChild's nextSibling to this child
                if (!is_null($this->lastChild)) {
                    $this->lastChild->nextSibling = & $child;
                }
                 
                // Now (re)set firstChild and lastChild
                $this->firstChild = & $this->childNodes[0];
                $this->lastChild = & $child;
            }
             
        }
147050
public function getCountType( $kind = XPathNodeType::All )
	{
		$count = 0;

		/**
		 * @var XPath2NodeIterator $iter
		 */
		$iter = $this->CloneInstance();
		$iter->Reset();
		while ( $iter->MoveNext() )
		{
			$result = $iter->getCurrent();
			if ( $result instanceof ExprIterator )
			{
				$count += $result->getCount( $kind );
			}
			else
			{
				if ( $kind == XPathNodeType::All || $kind == $result->getNodeType() )
				{
					$count++;
				}
			}
		}

		return $count;
	}
207563
public function hasType(NodeType $type)
    {
        foreach ($this->types as $t) {
            if ($t->getId() == $type->getId()) { return true; }
        }

        return false;
    }
1121903
public function isSection() {
		if ($this->isCurrent()) {
			return true;
		}
		$ancestors = $this->getAncestors();
		if (Director::get_current_page() instanceof Page) {
			$node = Director::get_current_page()->asMenuItem();
			if ($node) {
				$ancestors = $node->getAncestors();
				return $ancestors && in_array($this->ID, $node->getAncestors()->column());
			}
			
		}
		return false;
	}
674016
public function hasChildren()
    {
        $item = $this->data[$this->keys[$this->position]];

        return (is_object($item) && $item instanceof \Octris\Db\Type\SubObject);
    }
332106
def _is_last_child(self, tagname, attributes=None):
        
        children = self.cur_node.getchildren()
        if children:
            result = self._is_node(tagname, attributes, node=children[-1])
            return result

        return False
758762
public function hasChild()
    {
        return ((new \luya\admin\folder\Query())->where(['is_deleted' => 0, 'parent_id' => $this->getId()])->count() > 0 ? true: false);
    }
148881
function processChildrenOnce( &$textElements, &$children, $tpl, $rootNamespace, $name )
    {
        foreach ( array_keys( $children ) as $childKey )
        {
            $child =& $children[$childKey];
            $tpl->processNode( $child, $textElements, $rootNamespace, $name );
        }
        return true;
    }
1216473
public function has($selector)
    {
        $result = $this->createChildInstance();

        if ($this->length > 0) {
            foreach ($this as $node) {
                if ($node->find($selector)->length > 0) {
                    $result->addDomNode($node->get(0));
                }
            }
        }

        return $result;
    }