first commit

This commit is contained in:
2025-08-02 16:30:27 +02:00
commit 23646bfcee
14851 changed files with 1750626 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
<?php
namespace KupShop\AdminBundle\Util;
use Symfony\Component\DependencyInjection\ServiceLocator;
class WindowTabLocator
{
private $locator;
private $tabs;
public function __construct(ServiceLocator $locator, array $tabs)
{
$this->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;
}
}