本文整理汇总了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");