Prado\Web\UI\TControl::isDescendentOf PHP Method

isDescendentOf() final protected method

final protected isDescendentOf ( $ancestor ) : boolean
return boolean if the control is a descendent (parent, parent of parent, etc.) of the specified control
    protected final function isDescendentOf($ancestor)
    {
        $control = $this;
        while ($control !== $ancestor && $control->_parent) {
            $control = $control->_parent;
        }
        return $control === $ancestor;
    }
TControl