本文整理汇总了PHP中ModuleHandler::is_loaded方法的典型用法代码示例。如果您正苦于以下问题:PHP ModuleHandler::is_loaded方法的具体用法?PHP ModuleHandler::is_loaded怎么用?PHP ModuleHandler::is_loaded使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ModuleHandler
的用法示例。
在下文中一共展示了ModuleHandler::is_loaded方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Constructor
*/
protected function __construct()
{
global $section, $action;
parent::__construct(__FILE__);
// register backend
if (class_exists('backend')) {
$backend = backend::getInstance();
$import_menu = $backend->getMenu('shop_import');
if (!is_null($import_menu)) {
$import_menu->addChild(null, new backend_MenuItem($this->getLanguageConstant('menu_import_items'), url_GetFromFilePath($this->path . 'images/import.svg'), window_Open('shop_import_items', 350, $this->getLanguageConstant('title_import_items'), true, true, backend_UrlMake($this->name, 'import')), 6));
$import_menu->addChild(null, new backend_MenuItem($this->getLanguageConstant('menu_import_english'), url_GetFromFilePath($this->path . 'images/import.svg'), window_Open('shop_import_items', 350, $this->getLanguageConstant('title_import_items'), true, true, backend_UrlMake($this->name, 'import_english')), 6));
}
}
// register delivery method and create menu items
if (ModuleHandler::is_loaded('backend') && ModuleHandler::is_loaded('shop')) {
require_once 'units/method.php';
require_once 'units/pickup_method.php';
Paid_DeliveryMethod::getInstance($this);
Pickup_DeliveryMethod::getInstance($this);
}
if (ModuleHandler::is_loaded('head_tag') && $section == 'shop' && $action == 'checkout') {
$head_tag = head_tag::getInstance();
$head_tag->addTag('script', array('src' => url_GetFromFilePath($this->path . 'include/pikaday.js'), 'type' => 'text/javascript'));
$head_tag->addTag('link', array('href' => url_GetFromFilePath($this->path . 'include/pikaday.css'), 'rel' => 'stylesheet', 'type' => 'text/css'));
$head_tag->addTag('link', array('href' => url_GetFromFilePath($this->path . 'include/checkout.css'), 'rel' => 'stylesheet', 'type' => 'text/css'));
}
if (ModuleHandler::is_loaded('backend') && ModuleHandler::is_loaded('head_tag') && $section == 'backend') {
$head_tag = head_tag::getInstance();
$head_tag->addTag('script', array('src' => url_GetFromFilePath($this->path . 'include/backend.js'), 'type' => 'text/javascript'));
}
// connect transaction handling event
Events::connect('shop', 'transaction-completed', 'on_transaction_completed', $this);
}