本文整理匯總了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);
}