, ajax:
$module_name = 'mymodule';
if (Module::isInstalled($module_name) && Module::isEnabled($module_name))
{
$mod = Module::getInstanceByName($module_name);
if (method_exists($mod, 'doSomething'))
$mod->doSomething();
}
Module::getInstanceByName('mymodule')->l('string')
, , .
, $this->l\((.*)\)
. Module::getInstanceByName('modulename')->l('')
, .
, Module::getInstanceByName('modulename')->l('string1')
, $this->l('string1')
, .
, , :
public static $l = array();
public function __construct()
{
...
$this->init();
}
public function init()
{
if (self::isInstalled($this->name)) {
self::$l = array(
'string1' => $this->l('string1'),
);
}
}
Module::getInstanceByName
, .
, .