add composer-unused, comprehensive docs, and project restructure
- Add icanhazstring/composer-unused as dev dependency for dependency hygiene checks - Add German documentation (docs/) covering architecture, conventions, workflows, and developer checklists - Add API layer (ApiAuth, ApiBootstrap, ApiResponse), audit, scheduler, custom fields, and SSO services - Add Microsoft OIDC SSO, API token management, and user lifecycle features - Add swagger-ui vendor integration and OpenAPI spec - Add production Docker setup and bin/ scripts - Update composer dependencies, config, templates, and frontend assets throughout Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
67
lib/Support/Search/SearchUiMetaProvider.php
Normal file
67
lib/Support/Search/SearchUiMetaProvider.php
Normal file
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
|
||||
namespace MintyPHP\Support\Search;
|
||||
|
||||
class SearchUiMetaProvider
|
||||
{
|
||||
private const ICONS = [
|
||||
'address-book' => 'bi-people',
|
||||
'users' => 'bi-person-badge',
|
||||
'tenants' => 'bi-buildings',
|
||||
'departments' => 'bi-diagram-3',
|
||||
'roles' => 'bi-people',
|
||||
'permissions' => 'bi-shield-lock',
|
||||
'scheduled-jobs' => 'bi-calendar-check',
|
||||
'pages' => 'bi-file-text',
|
||||
'mail-log' => 'bi-envelope-paper',
|
||||
'api-audit' => 'bi-shield-check',
|
||||
'docs' => 'bi-journal-text',
|
||||
];
|
||||
|
||||
private const LIST_URL_KEYS = [
|
||||
'address-book',
|
||||
'users',
|
||||
'tenants',
|
||||
'departments',
|
||||
'roles',
|
||||
'permissions',
|
||||
'scheduled-jobs',
|
||||
'pages',
|
||||
'mail-log',
|
||||
'api-audit',
|
||||
];
|
||||
|
||||
public static function iconForKey(string $key): string
|
||||
{
|
||||
return self::ICONS[$key] ?? 'bi-search';
|
||||
}
|
||||
|
||||
public static function listUrl(string $key, string $query): string
|
||||
{
|
||||
$encoded = urlencode($query);
|
||||
|
||||
return match ($key) {
|
||||
'address-book' => lurl('address-book') . '?search=' . $encoded,
|
||||
'users' => lurl('admin/users') . '?search=' . $encoded,
|
||||
'tenants' => lurl('admin/tenants') . '?search=' . $encoded,
|
||||
'departments' => lurl('admin/departments') . '?search=' . $encoded,
|
||||
'roles' => lurl('admin/roles') . '?search=' . $encoded,
|
||||
'permissions' => lurl('admin/permissions') . '?search=' . $encoded,
|
||||
'scheduled-jobs' => lurl('admin/scheduled-jobs') . '?search=' . $encoded,
|
||||
'pages' => lurl(''),
|
||||
'mail-log' => lurl('admin/mail-log') . '?search=' . $encoded,
|
||||
'api-audit' => lurl('admin/api-audit') . '?search=' . $encoded,
|
||||
default => lurl(''),
|
||||
};
|
||||
}
|
||||
|
||||
public static function hasIconForKey(string $key): bool
|
||||
{
|
||||
return array_key_exists($key, self::ICONS);
|
||||
}
|
||||
|
||||
public static function hasListUrlForKey(string $key): bool
|
||||
{
|
||||
return in_array($key, self::LIST_URL_KEYS, true);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user