本文整理匯總了PHP中Modules::includeModule方法的典型用法代碼示例。如果您正苦於以下問題:PHP Modules::includeModule方法的具體用法?PHP Modules::includeModule怎麽用?PHP Modules::includeModule使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Modules
的用法示例。
在下文中一共展示了Modules::includeModule方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
public function __construct()
{
$this->_var3 = App::USER();
$this->_var4 = App::DB();
Modules::includeModule("catalog");
$this->_var5 = new CatalogElement();
$this->_var6 = array("CATALOG_ID" => 3, "CATALOG_TYPE" => "some_catalog");
}
示例2: getCatalogFields
<?php
namespace ScriptAcid;
if (!defined("KERNEL_INCLUDED") || KERNEL_INCLUDED !== true) {
die;
}
if (!Modules::includeModule('catalog')) {
ShowError("Модуль каталогов не установлен.");
return;
}
function getCatalogFields($array, $clear = false)
{
global $arParams;
$arCheckbox = array("ACTIVE");
$arText = array('NAME', 'CODE');
$arHidden = array('ID', 'CATALOG_ID', 'TIMESTAMP_X', 'SID');
$arSelect = array('CATALOG_SECTION_ID', 'PREVIEW_TEXT_TYPE', 'DETAIL_TEXT_TYPE');
$arTextarea = array('PREVIEW_TEXT', 'DETAIL_TEXT');
$arFile = array('PREVIEW_PICTURE', 'DETAIL_PICTURE');
$arExclude = array("ID");
if ($clear) {
foreach ($array as $k) {
$arField = array();
if (in_array($k, $arHidden)) {
$arField['TYPE'] = 'hidden';
} elseif (in_array($k, $arSelect)) {
$arField['TYPE'] = 'select';
} elseif (in_array($k, $arCheckbox)) {
$arField['TYPE'] = 'checkbox';
} elseif (in_array($k, $arTextarea)) {
示例3: SetTitle
<?php
namespace ScriptAcid;
require_once $_SERVER["DOCUMENT_ROOT"] . "/scriptacid/core/application.php";
SetTitle("Админка::Элементы каталога");
Modules::includeModule("catalog");
App::get()->makePage(function (&$arPageParams) {
?>
<?php
switch ($_GET["ACTION"]) {
case 'ADD_SECTION':
?>
<h3><?php
echo LANG("MODULE_CATALOG_SECTION_ADD_TITLE");
?>
</h3>
<?php
ShowMsg();
?>
<?php
App::callComponent(":catalog.section.add", "_admin", array("FIELDS" => array("ID", "ACTIVE", "NAME", "CATALOG_SECTION_ID", "CATALOG_ID", "SORT", "CODE", "PREVIEW_PICTURE", "PREVIEW_TEXT", "PREVIEW_TEXT_TYPE", "DETAIL_PICTURE", "DETAIL_TEXT", "DETAIL_TEXT_TYPE"), "TYPE" => $_GET["TYPE"], "CATALOG_ID" => $_GET['CATALOG_ID']));
?>
<?php
break;
case 'ADD':
?>
<h3><?php
echo LANG("MODULE_CATALOG_ELEMENTS_ADD_TITLE");