BaseModuleInterface
interface BaseModuleInterface
Methods
This method is called when the plugin is installed for the first time
This method is called when a newer version of the plugin is installed
This method is called just before the deletion of the module, giving the module an opportunity to delete its data.
This method is called before the module activation, and may prevent it by returning false.
This method is called just after the module was successfully activated.
This method is called before the module de-activation, and may prevent it by returning false.
This method is called just after the module was successfully deactivated.
Sets a module titles for various languages
Get a module's configuration variable
Set module configuration variable, creating it if required
Ensure the proper deployment of the module's images.
No description
No description
No description
No description
This method adds new compilers to Thelia container
No description
Create or update module hooks returned by the getHooks
function
Details
at line 25
install(
ConnectionInterface $con = null)
This method is called when the plugin is installed for the first time
at line 34
update(
string $currentVersion,
string $newVersion,
ConnectionInterface $con = null)
This method is called when a newer version of the plugin is installed
at line 44
destroy(
ConnectionInterface $con = null,
bool $deleteModuleData = false)
This method is called just before the deletion of the module, giving the module an opportunity to delete its data.
at line 51
activate(
Module $moduleModel = null)
This method is called when the module is activated
at line 58
deActivate(
Module $moduleModel = null)
This method is called when the module is deactivated
at line 68
bool
preActivation(
ConnectionInterface $con = null)
This method is called before the module activation, and may prevent it by returning false.
at line 75
postActivation(
ConnectionInterface $con = null)
This method is called just after the module was successfully activated.
at line 83
bool
preDeactivation(
ConnectionInterface $con = null)
This method is called before the module de-activation, and may prevent it by returning false.
at line 90
postDeactivation(
ConnectionInterface $con = null)
This method is called just after the module was successfully deactivated.
at line 99
setTitle(
Module $module,
array $titles)
Sets a module titles for various languages
at line 109
static
string
getConfigValue(
string $variableName,
string $defaultValue = null,
null $valueLocale = null)
Get a module's configuration variable
at line 121
static
$this;
setConfigValue(
string $variableName,
string $variableValue,
null $valueLocale = null,
bool $createIfNotExists = true)
Set module configuration variable, creating it if required
at line 141
deployImageFolder(
Module $module,
string $folderPath,
ConnectionInterface $con = null)
Ensure the proper deployment of the module's images.
TODO : this method does not take care of internationalization. This is a bug.
at line 147
Module
getModuleModel()
at line 152
static
string
getModuleId()
at line 157
static
string
getModuleCode()
at line 162
string
getCode()
at line 200
static
getCompilers()
This method adds new compilers to Thelia container
You must return an array. This array can contain : - arrays - one or many instance(s) of \Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface
in the first case, your array must contains 2 indexes. The first is the compiler instance and the second the compilerPass type. Example : return array( array( new \MyModule\DependencyInjection\Compiler\MySuperCompilerPass(), \Symfony\Component\DependencyInjection\Compiler\PassConfig::TYPEBEFOREOPTIMIZATION ) );
In the seconde case, just an instance of CompilerPassInterface. Example : return array ( new \MyModule\DependencyInjection\Compiler\MySuperCompilerPass() );
But you can combine both behaviors Example :
return array( new \MyModule\DependencyInjection\Compiler\MySuperCompilerPass(), array( new \MyModule\DependencyInjection\Compiler\MyOtherSuperCompilerPass(), Symfony\Component\DependencyInjection\Compiler\PassConfig::TYPEBEFOREOPTIMIZATION ) );
at line 244
array
getHooks()
at line 249
registerHooks()
Create or update module hooks returned by the getHooks
function