Initial Commit
This commit is contained in:
40
local/modules/SliderRevolution/SliderRevolution.php
Normal file
40
local/modules/SliderRevolution/SliderRevolution.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?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']);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user