module modification
This commit is contained in:
@@ -1,36 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<config xmlns="http://thelia.net/schema/dic/config"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://thelia.net/schema/dic/config http://thelia.net/schema/dic/config/thelia-1.0.xsd">
|
||||
|
||||
<loops>
|
||||
<!-- sample definition
|
||||
<loop name="MySuperLoop" class="MyModule\Loop\MySuperLoop" />
|
||||
-->
|
||||
</loops>
|
||||
|
||||
<forms>
|
||||
<!--
|
||||
<form name="MyFormName" class="MyModule\Form\MySuperForm" />
|
||||
-->
|
||||
</forms>
|
||||
|
||||
<commands>
|
||||
<!--
|
||||
<command class="MyModule\Command\MySuperCommand" />
|
||||
-->
|
||||
</commands>
|
||||
|
||||
<templateDirectives>
|
||||
<!-- Sample definition
|
||||
<templateDirectives class="MyModule\Directive\MyTemplateDirective" name="my_filter"/>
|
||||
-->
|
||||
</templateDirectives>
|
||||
|
||||
<!--
|
||||
<services>
|
||||
|
||||
</services>
|
||||
-->
|
||||
</config>
|
||||
@@ -1,18 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module>
|
||||
<fullnamespace>FakeCB\FakeCB</fullnamespace>
|
||||
<descriptive locale="en_US">
|
||||
<title>fake cb</title>
|
||||
</descriptive>
|
||||
<descriptive locale="fr_FR">
|
||||
<title>simulation cb</title>
|
||||
</descriptive>
|
||||
<version>1.0</version>
|
||||
<author>
|
||||
<name>Manuel Raynaud</name>
|
||||
<email>mraynaud@openstudio.fr</email>
|
||||
</author>
|
||||
<type>payment</type>
|
||||
<thelia>2.0.0</thelia>
|
||||
<stability>alpha</stability>
|
||||
</module>
|
||||
@@ -1,88 +0,0 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* This program is free software; you can redistribute it and/or modify */
|
||||
/* it under the terms of the GNU General Public License as published by */
|
||||
/* the Free Software Foundation; either version 3 of the License */
|
||||
/* */
|
||||
/* This program is distributed in the hope that it will be useful, */
|
||||
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
|
||||
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
|
||||
/* GNU General Public License for more details. */
|
||||
/* */
|
||||
/* You should have received a copy of the GNU General Public License */
|
||||
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace FakeCB;
|
||||
|
||||
use Propel\Runtime\Connection\ConnectionInterface;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Thelia\Model\Base\ModuleImageQuery;
|
||||
use Thelia\Module\BaseModule;
|
||||
use Thelia\Module\PaymentModuleInterface;
|
||||
|
||||
class FakeCB extends BaseModule implements PaymentModuleInterface
|
||||
{
|
||||
protected $request;
|
||||
protected $dispatcher;
|
||||
|
||||
public function setRequest(Request $request)
|
||||
{
|
||||
$this->request = $request;
|
||||
}
|
||||
|
||||
public function getRequest()
|
||||
{
|
||||
return $this->request;
|
||||
}
|
||||
|
||||
public function setDispatcher(EventDispatcherInterface $dispatcher)
|
||||
{
|
||||
$this->dispatcher = $dispatcher;
|
||||
}
|
||||
|
||||
public function getDispatcher()
|
||||
{
|
||||
return $this->dispatcher;
|
||||
}
|
||||
|
||||
public function pay()
|
||||
{
|
||||
// TODO: Implement pay() method.
|
||||
}
|
||||
|
||||
|
||||
public function postActivation(ConnectionInterface $con = null)
|
||||
{
|
||||
/* insert the images from image folder if first module activation */
|
||||
$module = $this->getModuleModel();
|
||||
if(ModuleImageQuery::create()->filterByModule($module)->count() == 0) {
|
||||
$this->deployImageFolder($module, sprintf('%s/images', __DIR__));
|
||||
}
|
||||
|
||||
/* set module title */
|
||||
$this->setTitle(
|
||||
$module,
|
||||
array(
|
||||
"en_US" => "Credit Card",
|
||||
"fr_FR" => "Carte de crédit",
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
public function getCode()
|
||||
{
|
||||
return 'FakeCB';
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* This program is free software; you can redistribute it and/or modify */
|
||||
/* it under the terms of the GNU General Public License as published by */
|
||||
/* the Free Software Foundation; either version 3 of the License */
|
||||
/* */
|
||||
/* This program is distributed in the hope that it will be useful, */
|
||||
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
|
||||
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
|
||||
/* GNU General Public License for more details. */
|
||||
/* */
|
||||
/* You should have received a copy of the GNU General Public License */
|
||||
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace FakeCB\Tests;
|
||||
|
||||
use FakeCB\FakeCB;
|
||||
use Thelia\Tests\Module\BaseModuleTestor;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Etienne Roudeix <eroudeix@openstudio.fr>
|
||||
*
|
||||
*/
|
||||
class FakeCBTest extends BaseModuleTestor
|
||||
{
|
||||
public function getTestedClassName()
|
||||
{
|
||||
return 'FakeCB\FakeCB';
|
||||
}
|
||||
|
||||
public function getTestedInstance()
|
||||
{
|
||||
return new FakeCB();
|
||||
}
|
||||
|
||||
public function testInstall()
|
||||
{
|
||||
//$fakeCB = new FakeCB();
|
||||
|
||||
//$fakeCB->install();
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.6 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 3.1 KiB |
Reference in New Issue
Block a user