public function isDescendant($group = null) {
    if (is_numeric($group)) {
      $group = Group::factory((int) $group);
    }
    if (!isset($group->guid)) {
      return false;
    }
    // Check to see if the group is a descendant of the given group.
    if (!isset($this->parent)) {
      return false;
    }
    if ($this->parent->is($group)) {
      return true;
    }
    if ($this->parent->isDescendant($group)) {
      return true;
    }
    return false;
  }
public function isDescendant($group = null) {
    if (is_numeric($group)) {
      $group = Group::factory((int) $group);
    }
    if (!isset($group->guid)) {
      return false;
    }
    // Check to see if the group is a descendant of the given group.
    if (!isset($this->parent)) {
      return false;
    }
    if ($this->parent->is($group)) {
      return true;
    }
    if ($this->parent->isDescendant($group)) {
      return true;
    }
    return false;
  }
public function isDescendant ( $ group = null ) { if ( is_numeric ( $ group ) ) { $ group = Group :: factory ( ( int ) $ group ) ; } if ( ! isset ( $ group -> guid ) ) { return false ; } // Check to see if the group is a descendant of the given group. if ( ! isset ( $ this -> parent ) ) { return false ; } if ( $ this -> parent -> is ( $ group ) ) { return true ; } if ( $ this -> parent -> isDescendant ( $ group ) ) { return true ; } return false ; }
Check whether the group is a descendant of a group.

@param mixed $group The group, or the group's GUID.
@return bool True or false.
Check whether the group is a descendant of a group .