Changeset View
Changeset View
Standalone View
Standalone View
src/app/Tenant.php
Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | public static function getConfig($tenantId, string $key) | ||||
// Supported options (TODO: document this somewhere): | // Supported options (TODO: document this somewhere): | ||||
// - app.name (tenants.title will be returned) | // - app.name (tenants.title will be returned) | ||||
// - app.public_url and app.url | // - app.public_url and app.url | ||||
// - app.support_url | // - app.support_url | ||||
// - mail.from.address and mail.from.name | // - mail.from.address and mail.from.name | ||||
// - mail.reply_to.address and mail.reply_to.name | // - mail.reply_to.address and mail.reply_to.name | ||||
// - app.kb.account_delete and app.kb.account_suspended | // - app.kb.account_delete and app.kb.account_suspended | ||||
// - pgp.enable | |||||
if ($key == 'app.name') { | if ($key == 'app.name') { | ||||
return $tenant ? $tenant->title : \config($key); | return $tenant ? $tenant->title : \config($key); | ||||
} | } | ||||
$value = $tenant ? $tenant->getSetting($key) : null; | $value = $tenant ? $tenant->getSetting($key) : null; | ||||
return $value !== null ? $value : \config($key); | return $value !== null ? $value : \config($key); | ||||
▲ Show 20 Lines • Show All 44 Lines • Show Last 20 Lines |