-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
33 lines (27 loc) · 931 Bytes
/
index.php
File metadata and controls
33 lines (27 loc) · 931 Bytes
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
<?php
/*
* Coupons addon for Bear Framework
* https://github.com/bearcms/coupons-bearframework-addon
* Copyright (c) Amplilabs Ltd.
* Free to use under the MIT license.
*/
use BearFramework\App;
$app = App::get();
$context = $app->contexts->get(__DIR__);
$context->classes
->add('BearCMS\BearFrameworkAddons\Coupons', 'classes/Coupons.php')
->add('BearCMS\BearFrameworkAddons\Coupons\*', 'classes/Coupons/*.php');
$app->shortcuts
->add('coupons', function () {
return new \BearCMS\BearFrameworkAddons\Coupons();
});
$app->localization
->addDictionary('en', function () use ($context) {
return include $context->dir . '/locales/en.php';
})
->addDictionary('bg', function () use ($context) {
return include $context->dir . '/locales/bg.php';
})
->addDictionary('ro', function () use ($context) {
return include $context->dir . '/locales/ro.php';
});