-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModuleDescription.bay
More file actions
72 lines (58 loc) · 1.29 KB
/
ModuleDescription.bay
File metadata and controls
72 lines (58 loc) · 1.29 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
namespace App;
use Runtime.Entity.Hook;
use Runtime.Web.Annotations.Route;
use Runtime.Web.Hooks.PageNotFound;
use Runtime.Web.Hooks.Components;
use Runtime.Web.Hooks.DetectLanguage;
use Runtime.Web.Hooks.SetupLayout;
class ModuleDescription
{
/**
* Returns module name
*/
pure string getModuleName() => "App";
/**
* Returns module version
*/
pure string getModuleVersion() => "0.0.1";
/**
* Returns required modules
* @return Map<string>
*/
pure Dict<string> requiredModules() =>
{
"Runtime.Web": "*",
"Runtime.Widget": "*",
};
/**
* Returns enities
*/
pure Collection<Dict> entities() =>
[
/*new Hook("App.AppHook"),
new Hook("Runtime.WordPress.Theme.Metrika"),*/
DetectLanguage::hook({
"default_language": "en",
"allowed_languages": ["en"],
}),
/* Setup layout */
SetupLayout::hook({
"default": "App.Components.Layout.DefaultLayoutModel",
}),
/* Components */
Components::hook([
"App.Components.Blocks.CSS",
"App.Components.Blocks.Fonts"
]),
Components::header([
/*"App.Components.Blocks.Seo"*/
]),
Components::footer([
"App.Components.Blocks.Metrika"
]),
PageNotFound::hook("App.Components.Pages.NotFoundPage.NotFoundPageModel"),
#ifdef BACKEND then
new Route("App.Components.Routes"),
#endif
];
}