class AbstractDeliveryModule extends BaseModule implements DeliveryModuleInterface

Traits

Symfony\Component\DependencyInjection\ContainerAwareTrait

Constants

CLASSIC_MODULE_TYPE

DELIVERY_MODULE_TYPE

PAYMENT_MODULE_TYPE

MODULE_CATEGORIES

IS_ACTIVATED

IS_NOT_ACTIVATED

Methods

activate( Module $moduleModel = null)

This method is called when the module is activated

from  BaseModule
deActivate( Module $moduleModel = null)

This method is called when the module is deactivated

from  BaseModule
hasContainer()

No description

from  BaseModule
getContainer()

No description

from  BaseModule
hasRequest()

No description

from  BaseModule
setRequest( Request $request)

No description

from  BaseModule
getRequest()

No description

from  BaseModule
hasDispatcher()

No description

from  BaseModule
setDispatcher( EventDispatcherInterface $dispatcher)

No description

from  BaseModule
EventDispatcherInterface
getDispatcher()

No description

from  BaseModule
setTitle( Module $module, array $titles)

No description

from  BaseModule
static  string
getConfigValue( string $variableName, string $defaultValue = null, null $valueLocale = null)

No description

from  BaseModule
static  $this;
setConfigValue( string $variableName, string $variableValue, null $valueLocale = null, bool $createIfNotExists = true)

No description

from  BaseModule
deployImageFolder( Module $module, string $folderPath, ConnectionInterface $con = null)

No description

from  BaseModule
getModuleModel()

No description

from  BaseModule
static  string
getModuleId()

No description

from  BaseModule
static  string
getModuleCode()

No description

from  BaseModule
string
getCode()

No description

from  BaseModule
bool
isPaymentModuleFor( Order $order)

Check if this module is the payment module for a given order

from  BaseModule
bool
isDeliveryModuleFor( Order $order)

Check if this module is the delivery module for a given order

from  BaseModule
float|int
getCurrentOrderTotalAmount( bool $with_tax = true, bool $with_discount = true, bool $with_postage = true)

A convenient method to get the current order total, with or without tax, discount or postage.

from  BaseModule
static 
getCompilers()

No description

from  BaseModule
install( ConnectionInterface $con = null)

No description

from  BaseModule
update( string $currentVersion, string $newVersion, ConnectionInterface $con = null)

No description

from  BaseModule
bool
preActivation( ConnectionInterface $con = null)

No description

from  BaseModule
postActivation( ConnectionInterface $con = null)

No description

from  BaseModule
bool
preDeactivation( ConnectionInterface $con = null)

No description

from  BaseModule
postDeactivation( ConnectionInterface $con = null)

No description

from  BaseModule
destroy( ConnectionInterface $con = null, bool $deleteModuleData = false)

No description

from  BaseModule
array
getHooks()

No description

from  BaseModule
registerHooks()

No description

from  BaseModule
bool
handleVirtualProductDelivery()

No description

Area|null
getAreaForCountry( Country $country)

Return the first area that matches the given country for the given module

Details

in BaseModule at line 66
activate( Module $moduleModel = null)

This method is called when the module is activated

Parameters

Module $moduleModel the module

in BaseModule at line 92
deActivate( Module $moduleModel = null)

This method is called when the module is deactivated

Parameters

Module $moduleModel the module

in BaseModule at line 115
hasContainer()

in BaseModule at line 120
getContainer()

in BaseModule at line 129
hasRequest()

in BaseModule at line 134
setRequest( Request $request)

Parameters

Request $request

in BaseModule at line 144
Request getRequest()

Return Value

Request the request.

Exceptions

RuntimeException

in BaseModule at line 158
hasDispatcher()

in BaseModule at line 163
setDispatcher( EventDispatcherInterface $dispatcher)

Parameters

EventDispatcherInterface $dispatcher

in BaseModule at line 172
EventDispatcherInterface getDispatcher()

Return Value

EventDispatcherInterface

Exceptions

RuntimeException

in BaseModule at line 189
setTitle( Module $module, array $titles)

Parameters

Module $module the module.
array $titles an associative array of locale => title_string

in BaseModule at line 216
static string getConfigValue( string $variableName, string $defaultValue = null, null $valueLocale = null)

Parameters

string $variableName the variable name
string $defaultValue the default value, if variable is not defined
null $valueLocale the required locale, or null to get default one

Return Value

string the variable value

in BaseModule at line 225
static $this; setConfigValue( string $variableName, string $variableValue, null $valueLocale = null, bool $createIfNotExists = true)

Parameters

string $variableName the variable name
string $variableValue the variable value
null $valueLocale the locale, or null if not required
bool $createIfNotExists if true, the variable will be created if not already defined

Return Value

$this;

in BaseModule at line 234
deployImageFolder( Module $module, string $folderPath, ConnectionInterface $con = null)

Parameters

Module $module the module
string $folderPath the image folder path
ConnectionInterface $con

in BaseModule at line 313
Module getModuleModel()

Return Value

Module

in BaseModule at line 341
static string getModuleId()

Return Value

string The module id

in BaseModule at line 362
static string getModuleCode()

Return Value

string The module code, in a static way

in BaseModule at line 372
string getCode()

Return Value

string The module code

in BaseModule at line 383
bool isPaymentModuleFor( Order $order)

Check if this module is the payment module for a given order

Parameters

Order $order an order

Return Value

bool true if this module is the payment module for the given order.

in BaseModule at line 396
bool isDeliveryModuleFor( Order $order)

Check if this module is the delivery module for a given order

Parameters

Order $order an order

Return Value

bool true if this module is the delivery module for the given order.

in BaseModule at line 415
float|int getCurrentOrderTotalAmount( bool $with_tax = true, bool $with_discount = true, bool $with_postage = true)

A convenient method to get the current order total, with or without tax, discount or postage.

This method operates on the order currently in the user's session, and should not be used to get the total amount of an order already stored in the database. For such orders, use Order::getTotalAmount() method.

Parameters

bool $with_tax if true, to total price will include tax amount
bool $with_discount if true, the total price will include discount, if any
bool $with_postage if true, the total price will include the delivery costs, if any.

Return Value

float|int the current order amount.

in BaseModule at line 448
static getCompilers()

in BaseModule at line 456
install( ConnectionInterface $con = null)

Parameters

ConnectionInterface $con

in BaseModule at line 464
update( string $currentVersion, string $newVersion, ConnectionInterface $con = null)

Parameters

string $currentVersion the current (installed) module version, as defined in the module.xml file
string $newVersion the new module version, as defined in the module.xml file
ConnectionInterface $con

in BaseModule at line 472
bool preActivation( ConnectionInterface $con = null)

Parameters

ConnectionInterface $con

Return Value

bool true to continue module activation, false to prevent it.

in BaseModule at line 481
postActivation( ConnectionInterface $con = null)

Parameters

ConnectionInterface $con

in BaseModule at line 489
bool preDeactivation( ConnectionInterface $con = null)

Parameters

ConnectionInterface $con

Return Value

bool true to continue module de-activation, false to prevent it.

in BaseModule at line 498
postDeactivation( ConnectionInterface $con = null)

Parameters

ConnectionInterface $con

in BaseModule at line 506
destroy( ConnectionInterface $con = null, bool $deleteModuleData = false)

Parameters

ConnectionInterface $con
bool $deleteModuleData if true, the module should remove all its data from the system.

in BaseModule at line 514
array getHooks()

Return Value

array This method must be used when your module defines hooks. Override this and return an array of your hooks names to register them

This returned value must be like the example, only type and code are mandatory

Example:

return array(

 // Only register the title in the default language
 array(
     "type" => TemplateDefinition::BACK_OFFICE,
     "code" => "my_super_hook_name",
     "title" => "My hook",
     "description" => "My hook is really, really great",
 ),

 // Manage i18n
 array(
     "type" => TemplateDefinition::FRONT_OFFICE,
     "code" => "my_hook_name",
     "title" => array(
         "fr_FR" => "Mon Hook",
         "en_US" => "My hook",
     ),
     "description" => array(
         "fr_FR" => "Mon hook est vraiment super",
         "en_US" => "My hook is really, really great",
     ),
     "chapo" => array(
         "fr_FR" => "Mon hook est vraiment super",
         "en_US" => "My hook is really, really great",
     ),
     "block" => true,
     "active" => true
 )

);

in BaseModule at line 522
registerHooks()

at line 27
bool handleVirtualProductDelivery()

Return Value

bool

at line 39
Area|null getAreaForCountry( Country $country)

Return the first area that matches the given country for the given module

Parameters

Country $country

Return Value

Area|null