locator = $locator; $this->tabs = $tabs; } public function getTabs($type) { if (!isset($this->tabs[$type])) { return []; } $tabs = []; foreach ($this->tabs[$type] as $class => $priority) { if ($this->locator->has($class)) { if ($this->locator->get($class)->isVisible()) { $tabs[] = $this->locator->get($class); } } } return $tabs; } }