public function getGroupChildren(int $groupId) : array
{
$group = $this->db->first('SELECT groupid FROM airship_groups WHERE inherits = ?', $groupId);
if (empty($group)) {
return [];
}
foreach ($group as $g) {
foreach ($this->getGroupChildren((int) $g) as $c) {
\array_unshift($group, $c);
}
}
return $group;
}