. */ /* */ /*************************************************************************************/ namespace FakeCB; 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 install() { } public function afterActivation() { /* 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 destroy() { // TODO: Implement destroy() method. } public function getCode() { return 'FakeCB'; } }