[ticket/416] Only allow adding module more than once on proper modules

B3P-416
This commit is contained in:
Marc Alexander
2014-12-02 17:50:23 +01:00
parent 4bfd4212f4
commit 7dabf61f6b
8 changed files with 54 additions and 7 deletions

View File

@@ -26,6 +26,9 @@ class module_base implements module_interface
/** @var string Module language file */
protected $language;
/** @var bool Can include this module multiple times */
protected $multiple_includes = false;
/**
* {@inheritdoc}
*/
@@ -97,4 +100,12 @@ class module_base implements module_interface
{
return true;
}
/**
* {@inheritdoc}
*/
public function can_multi_include()
{
return $this->multiple_includes;
}
}