37 lines
1.5 KiB
PHP
37 lines
1.5 KiB
PHP
<?php
|
|
/*************************************************************************************/
|
|
/* This file is part of the Thelia package. */
|
|
/* */
|
|
/* 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 FreeDelivery;
|
|
|
|
use Propel\Runtime\Connection\ConnectionInterface;
|
|
use Thelia\Install\Database;
|
|
use Thelia\Module\BaseModule;
|
|
|
|
class FreeDelivery extends BaseModule
|
|
{
|
|
/** @var string */
|
|
const DOMAIN_NAME = 'freedelivery';
|
|
|
|
public function preActivation(ConnectionInterface $con = null)
|
|
{
|
|
if (!$this->getConfigValue('is_initialized', false)) {
|
|
$database = new Database($con);
|
|
|
|
$database->insertSql(null, array(__DIR__ . '/Config/thelia.sql'));
|
|
|
|
$this->setConfigValue('is_initialized', true);
|
|
}
|
|
|
|
return true;
|
|
}
|
|
}
|