public function hasAncestor(Element $element) { if ($this->parent === null) { return false; } if ($this->parent->getType() == Token::ELEMENT && $this->parent->getName() == $element->getName()) { return true; } return $this->parent->hasAncestor($element); }
protected function getAllowedAttributes() { $colgroupAllowedAttributes = array('/^span$/i' => Attribute::INT); return array_merge($colgroupAllowedAttributes, parent::getAllowedAttributes()); }