$errors * @var array $form * @var array $tenant */ use MintyPHP\Session; $values = $form ?? $tenant ?? []; $pageAuth = is_array($viewAuth['page'] ?? null) ? $viewAuth['page'] : []; $canUpdateTenant = (bool) ($pageAuth['can_update_tenant'] ?? false); $canDeleteTenant = (bool) ($pageAuth['can_delete_tenant'] ?? false); $canManageCustomFields = (bool) ($pageAuth['can_manage_custom_fields'] ?? false); $canManageSso = (bool) ($pageAuth['can_manage_sso'] ?? false); $isReadOnly = !$canUpdateTenant; $tenantDescription = trim((string) ($values['description'] ?? '')); $titleText = $tenantDescription !== '' ? $tenantDescription : ($isReadOnly ? t('View tenant') : t('Edit tenant')); $tenantUuid = (string) ($values['uuid'] ?? ''); $tenantLogoService = app(\MintyPHP\Service\Tenant\TenantLogoService::class); $tenantFaviconService = app(\MintyPHP\Service\Tenant\TenantFaviconService::class); $hasLogoLight = $tenantUuid !== '' && $tenantLogoService->hasLogo($tenantUuid, \MintyPHP\Service\Tenant\TenantLogoService::THEME_LIGHT); $hasLogoDark = $tenantUuid !== '' && $tenantLogoService->hasLogo($tenantUuid, \MintyPHP\Service\Tenant\TenantLogoService::THEME_DARK); $hasFavicon = $tenantUuid !== '' && $tenantFaviconService->hasFavicon($tenantUuid); ?>
$titleText, 'backHref' => 'admin/tenants', 'backTitle' => t('Cancel'), 'actions' => $canUpdateTenant ? [ [ 'form' => 'tenant-form', 'name' => 'action', 'value' => 'save', 'class' => 'secondary outline', 'label' => t('Save'), ], [ 'form' => 'tenant-form', 'name' => 'action', 'value' => 'save_close', 'class' => 'primary', 'label' => t('Save & close'), ], ] : [], ]; require templatePath('partials/app-details-titlebar.phtml'); ?>