/** * @param string $groupId * @route crew/groups/edit/{id} */ public function deleteGroup(string $groupId = '') { $groupId = (int) $groupId; $group = $this->account->getGroup($groupId); $post = $this->post(new DeleteGroupFilter()); if ($post) { if ($this->account->deleteGroup($groupId, $post['move_children'] ?? 0)) { \Airship\redirect($this->airship_cabin_prefix . '/crew/groups'); } } $this->lens('crew/group_delete', ['active_link' => 'bridge-link-admin-crew-groups', 'group' => $group, 'allowed_parents' => $this->account->getGroupTree(0, 'children', [$groupId])]); }