Initial import of space_profiles module
This commit is contained in:
26
components/TemplateRegistry.php
Normal file
26
components/TemplateRegistry.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace humhub\modules\space_profiles\components;
|
||||
|
||||
use Yii;
|
||||
|
||||
class TemplateRegistry
|
||||
{
|
||||
public const TEMPLATE_RESCUE_CENTER = 'rescue_center';
|
||||
|
||||
public static function options(): array
|
||||
{
|
||||
return [
|
||||
self::TEMPLATE_RESCUE_CENTER => Yii::t('SpaceProfilesModule.base', 'Rescue Center (Default)'),
|
||||
];
|
||||
}
|
||||
|
||||
public static function resolveView(?string $templateKey): string
|
||||
{
|
||||
if ($templateKey === self::TEMPLATE_RESCUE_CENTER || empty($templateKey)) {
|
||||
return 'templates/rescue-center';
|
||||
}
|
||||
|
||||
return 'templates/rescue-center';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user