$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;
$avatarUuid = (string) ($values['uuid'] ?? '');
$tenantAvatarService = app(\MintyPHP\Service\Tenant\TenantAvatarService::class);
$tenantFaviconService = app(\MintyPHP\Service\Tenant\TenantFaviconService::class);
$hasAvatar = $avatarUuid !== '' && $tenantAvatarService->hasAvatar($avatarUuid);
$hasFavicon = $avatarUuid !== '' && $tenantFaviconService->hasFavicon($avatarUuid);
?>
t('Home'), 'path' => 'admin'],
['label' => t('Tenants'), 'path' => 'admin/tenants'],
['label' => t('Edit tenant')],
];
require templatePath('partials/app-breadcrumb.phtml');
$titlebar = [
'title' => t('Edit tenant'),
'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');
?>