-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathOrderComment.php
More file actions
47 lines (40 loc) · 1.63 KB
/
Copy pathOrderComment.php
File metadata and controls
47 lines (40 loc) · 1.63 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
<?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.
*/
/* Copyright (c) OpenStudio */
/* email : dev@thelia.net */
/* web : http://www.thelia.net */
/* For the full copyright and license information, please view the LICENSE.txt */
/* file that was distributed with this source code. */
namespace OrderComment;
use OrderComment\Model\OrderCommentQuery;
use Propel\Runtime\Connection\ConnectionInterface;
use Symfony\Component\DependencyInjection\Loader\Configurator\ServicesConfigurator;
use Thelia\Core\Install\Database;
use Thelia\Module\BaseModule;
class OrderComment extends BaseModule
{
public function postActivation(ConnectionInterface $con = null): void
{
$wrapped = $con->getWrappedConnection();
$stmt = $wrapped->query("SHOW TABLES LIKE 'order_comment'");
if ($stmt->fetchColumn() === false) {
$database = new Database($wrapped);
$database->insertSql(null, [__DIR__.'/Config/TheliaMain.sql']);
}
}
public static function configureServices(ServicesConfigurator $servicesConfigurator): void
{
$servicesConfigurator->load(self::getModuleCode().'\\', __DIR__)
->exclude([__DIR__.'/I18n/*'])
->autowire()
->autoconfigure();
}
}