-
Notifications
You must be signed in to change notification settings - Fork 1
/
HookAdminHome.php
61 lines (51 loc) · 1.58 KB
/
HookAdminHome.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
49
50
51
52
53
54
55
56
57
58
59
60
61
<?php
/*
* This file is part of the Thelia package.
* http://www.thelia.net
*
* (c) OpenStudio <info@thelia.net>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace HookAdminHome;
use Symfony\Component\DependencyInjection\Loader\Configurator\ServicesConfigurator;
use Thelia\Core\Template\TemplateDefinition;
use Thelia\Module\BaseModule;
class HookAdminHome extends BaseModule
{
/** @var string */
public const DOMAIN_NAME = 'hookadminhome';
/** @var string */
public const ACTIVATE_NEWS = 'activate_home_news';
/** @var string */
public const ACTIVATE_SALES = 'activate_home_sales';
/** @var string */
public const ACTIVATE_INFO = 'activate_home_info';
/** @var string */
public const ACTIVATE_STATS = 'activate_stats';
/**
* @return array
*/
public function getHooks()
{
return [
[
'type' => TemplateDefinition::BACK_OFFICE,
'code' => 'hook_home_stats',
'title' => 'Hook Home Stats',
'description' => 'Hook to change default stats',
],
];
}
/**
* Defines how services are loaded in your modules.
*/
public static function configureServices(ServicesConfigurator $servicesConfigurator): void
{
$servicesConfigurator->load(self::getModuleCode().'\\', __DIR__)
->exclude([THELIA_MODULE_DIR.ucfirst(self::getModuleCode()).'/I18n/*'])
->autowire(true)
->autoconfigure(true);
}
}