public function getDescendants($andSelf = false) {
    $return = [];
    $entities = Nymph::getEntities(
        ['class' => '\Tilmeld\Entities\Group'],
        ['&',
          'equal' => ['enabled', true],
          'ref' => ['parent', $this]
        ]
    );
    foreach ($entities as $entity) {
      $childArray = $entity->getDescendants(true);
      $return = array_merge($return, $childArray);
    }
    $hooked = $this;
    if (class_exists('\SciActive\Hook')) {
      $class = get_class();
      \SciActive\Hook::hookObject($hooked, $class.'->', false);
    }
    if ($andSelf) {
      $return[] = $hooked;
    }
    return $return;
  }
public function getDescendants($andSelf = false) {
    $return = [];
    $entities = Nymph::getEntities(
        ['class' => '\Tilmeld\Entities\Group'],
        ['&',
          'equal' => ['enabled', true],
          'ref' => ['parent', $this]
        ]
    );
    foreach ($entities as $entity) {
      $childArray = $entity->getDescendants(true);
      $return = array_merge($return, $childArray);
    }
    $hooked = $this;
    if (class_exists('\SciActive\Hook')) {
      $class = get_class();
      \SciActive\Hook::hookObject($hooked, $class.'->', false);
    }
    if ($andSelf) {
      $return[] = $hooked;
    }
    return $return;
  }
public function getDescendants ( $ andSelf = false ) { $ return = [ ] ; $ entities = Nymph :: getEntities ( [ 'class' => '\Tilmeld\Entities\Group' ] , [ '&' , 'equal' => [ 'enabled' , true ] , 'ref' => [ 'parent' , $ this ] ] ) ; foreach ( $ entities as $ entity ) { $ childArray = $ entity -> getDescendants ( true ) ; $ return = array_merge ( $ return , $ childArray ) ; } $ hooked = $ this ; if ( class_exists ( '\SciActive\Hook' ) ) { $ class = get_class ( ) ; \ SciActive \ Hook :: hookObject ( $ hooked , $ class . '->' , false ) ; } if ( $ andSelf ) { $ return [ ] = $ hooked ; } return $ return ; }
Gets an array of the group's descendant groups.

@param bool $andSelf Include this group in the returned array.
@return array An array of groups.
Gets an array of the group s descendant groups .