Files
le-matelot/local/modules/GiftOffered/GiftOffered.php
2020-01-27 08:56:08 +01:00

44 lines
1.7 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 GiftOffered;
use Propel\Runtime\Connection\ConnectionInterface;
use Thelia\Install\Database;
use Thelia\Model\Config;
use Thelia\Model\ConfigQuery;
use Thelia\Module\BaseModule;
class GiftOffered extends BaseModule
{
/** @var string */
const DOMAIN_NAME = 'giftoffered';
const DEFAULT_THELIA_PREFIX = 'admin';
const MESSAGE_DOMAIN = 'gift_offered';
/*
* You may now override BaseModuleInterface methods, such as:
* install, destroy, preActivation, postActivation, preDeactivation, postDeactivation
*
* Have fun !
*/
public function postActivation(ConnectionInterface $con = null)
{
$verify = ConfigQuery::read('gifts_category');
if($verify === null){
ConfigQuery::write('gifts_category', '0', false, true);
ConfigQuery::write('gift_amount', '120', false, true);
}
}
}