-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPerfectStats.php
More file actions
28 lines (23 loc) · 901 Bytes
/
PerfectStats.php
File metadata and controls
28 lines (23 loc) · 901 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
<?php
namespace PerfectStats;
use Propel\Runtime\Connection\ConnectionInterface;
use Symfony\Component\DependencyInjection\Loader\Configurator\ServicesConfigurator;
use Thelia\Module\BaseModule;
class PerfectStats extends BaseModule
{
const MESSAGE_DOMAIN = "perfectstats";
const MODULE_CODE = "PerfectStats";
public function postActivation(ConnectionInterface $con = null): void
{
$currentYear = date('Y');
self::setConfigValue('current_year', $currentYear);
self::setConfigValue('previous_year', $currentYear - 1);
}
public static function configureServices(ServicesConfigurator $servicesConfigurator): void
{
$servicesConfigurator->load(self::getModuleCode().'\\', __DIR__)
->exclude([THELIA_MODULE_DIR . ucfirst(self::getModuleCode()). "/I18n/*"])
->autowire(true)
->autoconfigure(true);
}
}