protected function getParentElementId(DOMNode $node)
	{
		$parentNode = $node->parentNode;
		while (isset($parentNode))
		{
			if ($parentNode->nodeName === 'element')
			{
				return $parentNode->getAttribute('id');
			}
			$parentNode = $parentNode->parentNode;
		}
	}
protected function getParentElementId(DOMNode $node)
	{
		$parentNode = $node->parentNode;
		while (isset($parentNode))
		{
			if ($parentNode->nodeName === 'element')
			{
				return $parentNode->getAttribute('id');
			}
			$parentNode = $parentNode->parentNode;
		}
	}
protected function getParentElementId ( DOMNode $ node ) { $ parentNode = $ node -> parentNode ; while ( isset ( $ parentNode ) ) { if ( $ parentNode -> nodeName === 'element' ) { return $ parentNode -> getAttribute ( 'id' ) ; } $ parentNode = $ parentNode -> parentNode ; } }
Get the ID of the closest "element" ancestor

@param  DOMNode     $node Context node
@return string|null
Get the ID of the closest element ancestor