getTabGroups(); $keys = array_keys($groups); return (string) $this->getRequestParameter('tab_group', reset($keys)); } public function getSections(): array { $groups = $this->getTabGroups(); return $groups[$this->getCurrentTabGroup()] ?? []; } public function getCurrentTabGroupSection(): string { $groups = $this->getTabGroups(); $sections = $groups[$this->getCurrentTabGroup()] ?? reset($groups); return (string) $this->getRequestParameter('tab_group_section', reset($sections)); } public function getTabGroupLink(string $groupKey): string { $rawUrl = $this->getRequestUrl(); $url = preg_replace('/&tab_group[^&]*/i', '', $rawUrl); return $url . '&tab_group=' . $groupKey; } public function getTabGroupSectionLink(string $groupKey, string $sectionKey): string { $rawUrl = $this->getTabGroupLink($groupKey); $url = preg_replace('/&tab_group_section[^&]*/i', '', $rawUrl); return $url . '&tab_group_section=' . $sectionKey; } }