PluginProbe
User Access Manager / 2.3.18
User Access Manager v2.3.18
2.3.20 2.3.19 2.3.18 2.3.17 2.3.16 2.3.15 2.3.14 2.3.13 trunk 0.6 0.6.1 0.6.2 0.7 0.7 Beta 0.7.0.1 0.8 0.8.0.1 0.8.0.2 0.9 0.9.1 0.9.1.1 0.9.1.2 0.9.1.3 0.9.1.4 1.0 All 136 releases
← All changes | src/Controller/Backend/ControllerTabNavigationTrait.php +3 -7 trunk2.3.18 View file →
@@ -19,12 +19,10 @@
19 19 public function getCurrentTabGroup(): string
20 20 {
21 21 $groups = $this->getTabGroups();
22 22 $keys = array_keys($groups);
23 - $default = (string) reset($keys);
24 - $group = (string) $this->getRequestParameter('tab_group', $default);
25 23
26 - return isset($groups[$group]) === true ? $group : $default;
24 + return (string) $this->getRequestParameter('tab_group', reset($keys));
27 25 }
28 26
29 27 public function getSections(): array
30 28 {
@@ -35,13 +33,11 @@
35 33
36 34 public function getCurrentTabGroupSection(): string
37 35 {
38 36 $groups = $this->getTabGroups();
39 - $sections = (array) ($groups[$this->getCurrentTabGroup()] ?? reset($groups));
40 - $default = (string) reset($sections);
41 - $section = (string) $this->getRequestParameter('tab_group_section', $default);
37 + $sections = $groups[$this->getCurrentTabGroup()] ?? reset($groups);
42 38
43 - return in_array($section, $sections, true) === true ? $section : $default;
39 + return (string) $this->getRequestParameter('tab_group_section', reset($sections));
44 40 }
45 41
46 42 public function getTabGroupLink(string $groupKey): string
47 43 {