-
Notifications
You must be signed in to change notification settings - Fork 25
/
Module.php
48 lines (43 loc) · 1.58 KB
/
Module.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
declare(strict_types=1);
namespace app\plugins\gruen_ci;
use app\models\layoutHooks\Hooks;
use app\plugins\ModuleBase;
use yii\web\View;
class Module extends ModuleBase
{
/**
* @return array<string, array{title: string, preview: string|null, bundle: class-string, hooks?: class-string<Hooks>, odtTemplate?: string}>
*/
public static function getProvidedLayouts(?View $view = null): array
{
if ($view) {
$asset = ThumbnailAssets::register($view);
$thumbBase = $asset->baseUrl;
} else {
$thumbBase = '/';
}
return [
'std' => [
'title' => 'Grünes CI',
'preview' => $thumbBase . '/layout-preview-green.png',
'bundle' => Assets2::class,
'hooks' => LayoutHooks2::class,
'odtTemplate' => __DIR__ . '/OpenOffice-Template-Gruen.odt',
],
'old' => [
'title' => 'Grünes CI (alt)',
'preview' => $thumbBase . '/layout-preview-old.png',
'bundle' => Assets1::class,
'odtTemplate' => __DIR__ . '/OpenOffice-Template-Gruen.odt',
],
'layout2023' => [
'title' => 'Grünes CI 2023',
'preview' => $thumbBase . '/layout-preview-ci3.png',
'bundle' => Assets3::class,
'hooks' => LayoutHooks3::class,
'odtTemplate' => __DIR__ . '/OpenOffice-Template-Gruen.odt',
],
];
}
}