Files
domokits/local/modules/SliderRevolution/SliderRevolution.php
2019-11-21 12:25:31 +01:00

41 lines
1.6 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 SliderRevolution;
use Propel\Runtime\Connection\ConnectionInterface;
use SliderRevolution\Model\SliderAssociationQuery;
use Thelia\Install\Database;
use Thelia\Module\BaseModule;
class SliderRevolution extends BaseModule
{
/** @var string */
const DOMAIN_NAME = 'sliderrevolution';
const SLIDER_ID = 'slider_id';
const FIN_COMPTE_A_REBOURS = 'countdown_end';
public function postActivation(ConnectionInterface $con = null)
{
// Creer la table si elle n'existe pas déjà
try {
SliderAssociationQuery::create()->findOne();
} catch (\Exception $ex) {
$database = new Database($con);
$database->insertSql(null, [__DIR__ . '/Config/thelia.sql']);
}
}
}