本文整理汇总了PHP中CComponentUtil类的典型用法代码示例。如果您正苦于以下问题:PHP CComponentUtil类的具体用法?PHP CComponentUtil怎么用?PHP CComponentUtil使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CComponentUtil类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: getParameters
/**
* Prepare and returns parameters of the component
*
* @param string $component Component name. For example: basis:elements.list
* @param array $prepareParams Array with settings for prepare parameters of merged the component. For example:
* <code>
* [
* 'SELECT_FIELDS' => array(
* 'RENAME' => 'LIST_SELECT_FIELDS',
* 'MOVE' => 'LIST'
* ]
* </code>
* Options:
* <ul>
* <li> RENAME — rename parameter
* <li> NAME — add new name (title) for parameter
* <li> MOVE — move parameter to another parameter group
* <li> DELETE — true or false
* </ul>
* @param array $arCurrentValues Don't change the name! It's used in the .parameters.php file (Hello from Bitrix)
* @param bool $selectOnlyListed Select parameters only listed in $prepareParams
* @return array Array for use in variable $arComponentParameters in the .parameters.php
* @throws \Bitrix\Main\LoaderException
*/
public static function getParameters($component, $prepareParams = [], $arCurrentValues, $selectOnlyListed = false)
{
$additionalComponentParams = [];
$componentParams = \CComponentUtil::GetComponentProps($component, $arCurrentValues);
if ($componentParams === false) {
throw new Main\LoaderException('Failed loading parameters for ' . $component);
}
if (!empty($prepareParams)) {
foreach ($componentParams['PARAMETERS'] as $code => &$params) {
if ($prepareParams[$code]['DELETE'] || $selectOnlyListed === true && !isset($prepareParams[$code])) {
unset($componentParams['PARAMETERS'][$code]);
continue;
}
if ($prepareParams[$code]['MOVE']) {
$params['PARENT'] = $prepareParams[$code]['MOVE'];
}
if ($prepareParams[$code]['NAME']) {
$params['NAME'] = $prepareParams[$code]['NAME'];
}
if ($prepareParams[$code]['RENAME']) {
$additionalComponentParams[$prepareParams[$code]['RENAME']] = $params;
unset($componentParams['PARAMETERS'][$code]);
}
}
unset($params);
$componentParams['PARAMETERS'] = array_replace_recursive($componentParams['PARAMETERS'], $additionalComponentParams);
}
return $componentParams;
}
开发者ID:lithium-li,项目名称:bbc-module,代码行数:53,代码来源:componentparameters.php
示例2: GetComponentProperties
public static function GetComponentProperties($name = '', $template = '', $siteTemplate = '', $currentValues = array())
{
$template = !$template || $template == '.default' ? '' : $template;
$arTemplates = CComponentUtil::GetTemplatesList($name, $siteTemplate);
$result = array('templates' => array());
$arSiteTemplates = array(".default" => GetMessage("PAR_MAN_DEFAULT"));
if (!empty($siteTemplate)) {
$dbst = CSiteTemplate::GetList(array(), array("ID" => $siteTemplate), array());
while ($siteTempl = $dbst->Fetch()) {
$arSiteTemplates[$siteTempl['ID']] = $siteTempl['NAME'];
}
}
foreach ($arTemplates as $k => $templ) {
$showTemplateName = $templ["TEMPLATE"] !== '' && $arSiteTemplates[$templ["TEMPLATE"]] != '' ? $arSiteTemplates[$templ["TEMPLATE"]] : GetMessage("PAR_MAN_DEF_TEMPLATE");
$arTemplates[$k]['DISPLAY_NAME'] = $templ['NAME'] . ' (' . $showTemplateName . ')';
}
$arTemplateProps = array();
if (is_array($arTemplates)) {
foreach ($arTemplates as $arTemplate) {
$result['templates'][] = $arTemplate;
$tName = !$arTemplate['NAME'] || $arTemplate['NAME'] == '.default' ? '' : $arTemplate['NAME'];
if ($tName == $template) {
$arTemplateProps = CComponentUtil::GetTemplateProps($name, $arTemplate['NAME'], $siteTemplate, $currentValues);
}
}
}
$result['parameters'] = array();
$arProps = CComponentUtil::GetComponentProps($name, $currentValues, $arTemplateProps);
$result['tooltips'] = self::FetchHelp($name);
if (!isset($arProps['GROUPS']) || !is_array($arProps['GROUPS'])) {
$arProps['GROUPS'] = array();
}
if (!isset($arProps['PARAMETERS']) || !is_array($arProps['PARAMETERS'])) {
$arProps['PARAMETERS'] = array();
}
$result['groups'] = array();
foreach ($arProps['GROUPS'] as $k => $arGroup) {
$arGroup['ID'] = $k;
$result['groups'][] = $arGroup;
}
foreach ($arProps['PARAMETERS'] as $k => $arParam) {
$arParam['ID'] = preg_replace("/[^a-zA-Z0-9_-]/is", "_", $k);
if (!isset($arParam['PARENT'])) {
$arParam['PARENT'] = 'ADDITIONAL_SETTINGS';
}
$result['parameters'][] = $arParam;
if ($arParam['TYPE'] == 'FILE') {
self::$fileDialogs[] = array('NAME' => $arParam['ID'], 'TARGET' => isset($arParam['FD_TARGET']) ? $arParam['FD_TARGET'] : 'F', 'EXT' => isset($arParam['FD_EXT']) ? $arParam['FD_EXT'] : '', 'UPLOAD' => isset($arParam['FD_UPLOAD']) && $arParam['FD_UPLOAD'] && $arParam['FD_TARGET'] == 'F', 'USE_ML' => isset($arParam['FD_USE_MEDIALIB']) && $arParam['FD_USE_MEDIALIB'], 'ONLY_ML' => isset($arParam['FD_USE_ONLY_MEDIALIB']) && $arParam['FD_USE_ONLY_MEDIALIB'], 'ML_TYPES' => isset($arParam['FD_MEDIALIB_TYPES']) ? $arParam['FD_MEDIALIB_TYPES'] : false);
}
// TOOLTIPS FROM .parameters langs
if (!isset($result['tooltips'][$arParam['ID'] . '_TIP'])) {
$tip = GetMessage($arParam['ID'] . '_TIP');
if ($tip) {
$result['tooltips'][$arParam['ID'] . '_TIP'] = $tip;
}
}
}
return $result;
}
开发者ID:Satariall,项目名称:izurit,代码行数:59,代码来源:component_params_manager.php
示例3: AddPanelButtons
function AddPanelButtons($mode, $componentName, $arButtons)
{
/** @global CMain $APPLICATION */
global $APPLICATION;
$arImages = array("add_element" => defined("PANEL_ADD_ELEMENT_BTN") ? PANEL_ADD_ELEMENT_BTN : "/bitrix/images/iblock/icons/new_element.gif", "edit_element" => defined("PANEL_EDIT_ELEMENT_BTN") ? PANEL_EDIT_ELEMENT_BTN : "/bitrix/images/iblock/icons/edit_element.gif", "edit_iblock" => defined("PANEL_EDIT_IBLOCK_BTN") ? PANEL_EDIT_IBLOCK_BTN : "/bitrix/images/iblock/icons/edit_iblock.gif", "history_element" => defined("PANEL_HISTORY_ELEMENT_BTN") ? PANEL_HISTORY_ELEMENT_BTN : "/bitrix/images/iblock/icons/history.gif", "edit_section" => defined("PANEL_EDIT_SECTION_BTN") ? PANEL_EDIT_SECTION_BTN : "/bitrix/images/iblock/icons/edit_section.gif", "add_section" => defined("PANEL_ADD_SECTION_BTN") ? PANEL_ADD_SECTION_BTN : "/bitrix/images/iblock/icons/new_section.gif", "element_list" => "/bitrix/themes/.default/icons/iblock/mnu_iblock_el.gif", "section_list" => "/bitrix/themes/.default/icons/iblock/mnu_iblock_sec.gif");
if (count($arButtons[$mode]) > 0) {
//Try to detect component via backtrace
if (strlen($componentName) <= 0 && function_exists("debug_backtrace")) {
$arTrace = debug_backtrace();
foreach ($arTrace as $arCallInfo) {
if (array_key_exists("file", $arCallInfo)) {
$file = strtolower(str_replace("\\", "/", $arCallInfo["file"]));
if (preg_match("#.*/bitrix/components/(.+?)/(.+?)/#", $file, $match)) {
$componentName = $match[1] . ":" . $match[2];
break;
}
}
}
}
if (strlen($componentName)) {
$arComponentDescription = CComponentUtil::GetComponentDescr($componentName);
if (is_array($arComponentDescription) && strlen($arComponentDescription["NAME"])) {
$componentName = $arComponentDescription["NAME"];
}
} else {
$componentName = GetMessage("IBLOCK_PANEL_UNKNOWN_COMPONENT");
}
$arPanelButton = array("SRC" => "/bitrix/images/iblock/icons/iblock.gif", "ALT" => $componentName, "TEXT" => $componentName, "MAIN_SORT" => 300, "SORT" => 30, "MENU" => array(), "MODE" => $mode);
foreach ($arButtons[$mode] as $i => $arSubButton) {
$arSubButton['IMAGE'] = $arImages[$i];
if ($arSubButton["DEFAULT"]) {
$arPanelButton["HREF"] = $arSubButton["ACTION"];
}
$arPanelButton["MENU"][] = $arSubButton;
}
if (count($arButtons["submenu"]) > 0) {
$arSubMenu = array("SRC" => "/bitrix/images/iblock/icons/iblock.gif", "ALT" => GetMessage("IBLOCK_PANEL_CONTROL_PANEL_ALT"), "TEXT" => GetMessage("IBLOCK_PANEL_CONTROL_PANEL"), "MENU" => array(), "MODE" => $mode);
foreach ($arButtons["submenu"] as $i => $arSubButton) {
$arSubButton['IMAGE'] = $arImages[$i];
$arSubMenu["MENU"][] = $arSubButton;
}
$arPanelButton["MENU"][] = array("SEPARATOR" => "Y");
$arPanelButton["MENU"][] = $arSubMenu;
}
$APPLICATION->AddPanelButton($arPanelButton);
}
if (count($arButtons["intranet"]) > 0 && CModule::IncludeModule("intranet")) {
/** @global CIntranetToolbar $INTRANET_TOOLBAR */
global $INTRANET_TOOLBAR;
foreach ($arButtons["intranet"] as $arButton) {
$INTRANET_TOOLBAR->AddButton($arButton);
}
}
}
开发者ID:Satariall,项目名称:izurit,代码行数:54,代码来源:iblock.php
示例4: fetchPropsHelp
function fetchPropsHelp($componentName_)
{
global $MESS;
$componentName = str_replace("..", "", $componentName_);
$componentName = str_replace(":", "/", $componentName);
$lang = preg_replace("/[^a-zA-Z0-9_]/is", "", $_GET["lang"]);
CComponentUtil::__IncludeLang("/freetrix/components/".$componentName, "/help/.tooltips.php", $lang);
$path = $_SERVER["DOCUMENT_ROOT"]."/freetrix/components/".$componentName."/help/.tooltips.php";
$arTooltips = array();
if(file_exists($path))
include($path);
?>var arTT = {};<?
if(is_array($arTooltips) && !empty($arTooltips))
{
foreach($arTooltips as $propName => $tooltip)
{
?>arTT["<?php
echo CUtil::JSEscape($propName);
?>
"] = '<?php
echo CUtil::JSEscape($tooltip);
?>
';<?
}
}
elseif(is_array($MESS))
{
foreach($MESS as $propName => $tooltip)
{
if(substr($propName, -4) == '_TIP')
{
?>arTT["<?php
echo CUtil::JSEscape(substr($propName, 0, -4));
?>
"] = '<?php
echo CUtil::JSEscape($tooltip);
?>
';<?
}
}
}
?>window.arComp2Tooltips["<?php
echo CUtil::JSEscape($componentName_);
?>
"] = arTT;<?
}
开发者ID:ASDAFF,项目名称:open_bx,代码行数:48,代码来源:fileman_load_comp2_params.php
示例5: handleComp2Tree
function handleComp2Tree()
{
$allowed_components = trim(COption::GetOptionString('fileman', "~allowed_components", ''));
// Name filter exists
if (strlen($allowed_components) > 0) {
$arAC = explode("\n", $allowed_components);
$arAC = array_unique($arAC);
$arAllowedComponents = array();
foreach ($arAC as $f) {
$f = preg_replace("/\\s/is", "", $f);
$f = preg_replace("/\\./is", "\\.", $f);
$f = preg_replace("/\\*/is", ".*", $f);
$arAllowedComponents[] = '/^' . $f . '$/';
}
$components_namespace = 'bitrix';
$mask = substr(md5($allowed_components), 2, 6);
} else {
$arAllowedComponents = false;
$components_namespace = false;
$mask = 0;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
global $CACHE_MANAGER;
$cache = array();
$arTree = false;
$lang = isset($_REQUEST['lang']) ? $_REQUEST['lang'] : LANGUAGE_ID;
$cache_name = 'fileman_component_tree_array_' . $lang;
if (isset($_GET['clear_comp2_cache']) && $_GET['clear_comp2_cache'] == 'Y') {
$CACHE_MANAGER->CleanDir("fileman_component_tree_array");
}
$ttl = 10 * 24 * 60 * 60;
// Time of life
if ($CACHE_MANAGER->Read($ttl, $cache_name, "fileman_component_tree_array")) {
$cache = $CACHE_MANAGER->Get($cache_name);
if (isset($cache[$mask])) {
$arTree = $cache[$mask];
}
}
if ($arTree === false) {
$arTree = $cache[$mask] = CComponentUtil::GetComponentsTree($components_namespace, $arAllowedComponents);
$CACHE_MANAGER->Set($cache_name, $cache);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
if (isset($arTree['#'])) {
handleChildren($arTree['#'], '');
}
}
开发者ID:Satariall,项目名称:izurit,代码行数:47,代码来源:fileman_load_components2.php
示例6: GetComponentProperties
public static function GetComponentProperties($name = '', $template = '', $siteTemplate = '', $currentValues = array())
{
$template = !$template || $template == '.default' ? '' : $template;
$arTemplates = CComponentUtil::GetTemplatesList($name, $siteTemplate);
$result = array('templates' => array());
$arTemplateProps = array();
if (is_array($arTemplates)) {
foreach ($arTemplates as $arTemplate) {
$result['templates'][] = $arTemplate;
$tName = !$arTemplate['NAME'] || $arTemplate['NAME'] == '.default' ? '' : $arTemplate['NAME'];
if ($tName == $template) {
$arTemplateProps = CComponentUtil::GetTemplateProps($name, $arTemplate['NAME'], $siteTemplate, $currentValues);
}
}
}
$result['parameters'] = array();
$arProps = CComponentUtil::GetComponentProps($name, $currentValues, $arTemplateProps);
$result['tooltips'] = self::FetchHelp($name);
if (!isset($arProps['GROUPS']) || !is_array($arProps['GROUPS'])) {
$arProps['GROUPS'] = array();
}
if (!isset($arProps['PARAMETERS']) || !is_array($arProps['PARAMETERS'])) {
$arProps['PARAMETERS'] = array();
}
$result['groups'] = array();
foreach ($arProps['GROUPS'] as $k => $arGroup) {
$arGroup['ID'] = $k;
$result['groups'][] = $arGroup;
}
foreach ($arProps['PARAMETERS'] as $k => $arParam) {
$arParam['ID'] = preg_replace("/[^a-zA-Z0-9_-]/is", "_", $k);
if (!isset($arParam['PARENT'])) {
$arParam['PARENT'] = 'ADDITIONAL_SETTINGS';
}
$result['parameters'][] = $arParam;
if ($arParam['TYPE'] == 'FILE') {
self::$fileDialogs[] = array('NAME' => $arParam['ID'], 'TARGET' => isset($arParam['FD_TARGET']) ? $arParam['FD_TARGET'] : 'F', 'EXT' => isset($arParam['FD_EXT']) ? $arParam['FD_EXT'] : '', 'UPLOAD' => isset($arParam['FD_UPLOAD']) && $arParam['FD_UPLOAD'] && $arParam['FD_TARGET'] == 'F', 'USE_ML' => isset($arParam['FD_USE_MEDIALIB']) && $arParam['FD_USE_MEDIALIB'], 'ONLY_ML' => isset($arParam['FD_USE_ONLY_MEDIALIB']) && $arParam['FD_USE_ONLY_MEDIALIB'], 'ML_TYPES' => isset($arParam['FD_MEDIALIB_TYPES']) ? $arParam['FD_MEDIALIB_TYPES'] : false);
}
}
return $result;
}
开发者ID:rasuldev,项目名称:torino,代码行数:41,代码来源:component_params_manager.php
示例7: onPrepareComponentParams
public function onPrepareComponentParams($arParams)
{
$arParams['FILTER_NAME'] = $this->initFilterName($arParams['FILTER_NAME']);
$this->initExternalValues($arParams['FILTER_NAME']);
$arParams['USERS_PER_PAGE'] = intval($arParams['USERS_PER_PAGE']);
$arParams['NAV_TITLE'] = !empty($arParams['NAV_TITLE']) ? $arParams['NAV_TITLE'] : GetMessage('INTR_ISL_PARAM_NAV_TITLE_DEFAULT');
$arParams['DATE_FORMAT'] = !empty($arParams['DATE_FORMAT']) ? $arParams['DATE_FORMAT'] : CComponentUtil::GetDateFormatDefault(false);
$arParams['DATE_FORMAT_NO_YEAR'] = !empty($arParams['DATE_FORMAT_NO_YEAR']) ? $arParams['DATE_FORMAT_NO_YEAR'] : CComponentUtil::GetDateFormatDefault(true);
InitBVar($arParams['FILTER_1C_USERS']);
InitBVar($arParams['FILTER_SECTION_CURONLY']);
InitBVar($arParams['SHOW_NAV_TOP']);
InitBVar($arParams['SHOW_NAV_BOTTOM']);
InitBVar($arParams['SHOW_UNFILTERED_LIST']);
InitBVar($arParams['SHOW_DEP_HEAD_ADDITIONAL']);
!isset($arParams["CACHE_TIME"]) && ($arParams["CACHE_TIME"] = 3600);
if ($arParams['CACHE_TYPE'] == 'A') {
$arParams['CACHE_TYPE'] = COption::GetOptionString("main", "component_cache_on", "Y");
}
$arParams['DETAIL_URL'] = COption::GetOptionString('intranet', 'search_user_url', '/user/#ID#/');
if (!array_key_exists("PM_URL", $arParams)) {
$arParams["PM_URL"] = "/company/personal/messages/chat/#USER_ID#/";
}
if (!array_key_exists("PATH_TO_USER_EDIT", $arParams)) {
$arParams["PATH_TO_USER_EDIT"] = '/company/personal/user/#user_id#/edit/';
}
if (!array_key_exists("PATH_TO_CONPANY_DEPARTMENT", $arParams)) {
$arParams["PATH_TO_CONPANY_DEPARTMENT"] = "/company/structure.php?set_filter_structure=Y&structure_UF_DEPARTMENT=#ID#";
}
if (IsModuleInstalled("video") && !array_key_exists("PATH_TO_VIDEO_CALL", $arParams)) {
$arParams["PATH_TO_VIDEO_CALL"] = "/company/personal/video/#USER_ID#/";
}
if (!$this->getUser()->CanDoOperation("edit_all_users") && isset($arParams["SHOW_USER"]) && $arParams["SHOW_USER"] != "fired") {
$arParams["SHOW_USER"] = "active";
}
return parent::onPrepareComponentParams($arParams);
}
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:36,代码来源:class.php
示例8: GetById
public static function GetById($id, $bWithParameters = false, $arAllCurrentValues = false)
{
$id = _normalizePath(strtolower($id));
$folders = array("/bitrix/gadgets", "/local/gadgets");
if (($p = strpos($id, "/")) > 0) {
//specific namespace
$arGdNS = array(substr($id, 0, $p));
$id = substr($id, $p + 1);
} else {
// Find all namespaces of gadgets
$arGdNS = array("bitrix");
foreach ($folders as $folder) {
$gdDir = $_SERVER["DOCUMENT_ROOT"] . $folder;
if (is_dir($gdDir) && ($handle = opendir($gdDir))) {
while (false !== ($item = readdir($handle))) {
if (is_dir($gdDir . "/" . $item) && $item != "." && $item != ".." && $item != "bitrix") {
$arGdNS[] = $item;
}
}
closedir($handle);
}
}
}
// Find all gadgets
$arGadget = false;
foreach ($folders as $folder) {
foreach ($arGdNS as $NS) {
$gdDir = $_SERVER["DOCUMENT_ROOT"] . $folder . "/" . $NS;
$gdDirSiteRoot = $folder . "/" . $NS;
if (is_dir($gdDir . "/" . $id)) {
$arDescription = array();
CComponentUtil::__IncludeLang($gdDirSiteRoot . "/" . $id, "/.description.php");
if (!file_exists($gdDir . "/" . $id . "/.description.php")) {
continue;
}
if (!@(include $gdDir . "/" . $id . "/.description.php")) {
$arGadget = false;
continue;
}
if (isset($arDescription["LANG_ONLY"]) && $arDescription["LANG_ONLY"] != LANGUAGE_ID) {
$arGadget = false;
continue;
}
if ($bWithParameters) {
$arCurrentValues = array();
if (is_array($arAllCurrentValues)) {
foreach ($arAllCurrentValues as $k => $v) {
$pref = "G_" . strtoupper($id) . "_";
if (substr($k, 0, strlen($pref)) == $pref) {
$arCurrentValues[substr($k, strlen($pref))] = $v;
} else {
$pref = "GU_" . strtoupper($id) . "_";
if (substr($k, 0, strlen($pref)) == $pref) {
$arCurrentValues[substr($k, strlen($pref))] = $v;
}
}
}
}
CComponentUtil::__IncludeLang($gdDirSiteRoot . "/" . $id, "/.parameters.php");
$arParameters = array();
if (file_exists($gdDir . "/" . $id . "/.parameters.php")) {
include $gdDir . "/" . $id . "/.parameters.php";
}
$arDescription["PARAMETERS"] = $arParameters["PARAMETERS"];
$arDescription["USER_PARAMETERS"] = array("TITLE_STD" => array("NAME" => GetMessage("CMDESKTOP_UP_TITLE_STD"), "TYPE" => "STRING", "DEFAULT" => ""));
if (array_key_exists("USER_PARAMETERS", $arParameters) && is_array($arParameters["USER_PARAMETERS"])) {
$arDescription["USER_PARAMETERS"] = array_merge($arDescription["USER_PARAMETERS"], $arParameters["USER_PARAMETERS"]);
}
}
$arDescription["PATH"] = $gdDir . "/" . $id;
$arDescription["PATH_SITEROOT"] = $gdDirSiteRoot . "/" . $id;
$arDescription["ID"] = strtoupper($id);
if ($arDescription["ICON"] && substr($arDescription["ICON"], 0, 1) != "/") {
$arDescription["ICON"] = "/bitrix/gadgets/" . $NS . "/" . $id . "/" . $arDescription["ICON"];
}
unset($arDescription["NOPARAMS"]);
$arGadget = $arDescription;
}
}
}
return $arGadget;
}
开发者ID:webgksupport,项目名称:alpina,代码行数:82,代码来源:include.php
示例9: array
<?php
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
die;
}
if (!CModule::IncludeModule("forum")) {
return;
}
$arComponentParameters = array("PARAMETERS" => array("TYPE_RANGE" => array("PARENT" => "BASE", "NAME" => GetMessage("F_RSS_TYPE"), "TYPE" => "LIST", "VALUES" => array("RSS1" => "RSS 0.92", "RSS2" => "RSS 2.0", "ATOM" => "Atom 0.3"), "MULTIPLE" => "Y", "DEFAULT" => array("RSS1", "RSS2", "ATOM")), "FID_RANGE" => CForumParameters::GetForumsMultiSelect(GetMessage("F_FID_RANGE"), "BASE"), "IID" => array("PARENT" => "BASE", "NAME" => GetMessage("F_IID"), "TYPE" => "STRING", "DEFAULT" => '={$_REQUEST["IID"]}'), "MODE" => array("PARENT" => "BASE", "NAME" => GetMessage("F_MODE_TEMPLATE"), "TYPE" => "LIST", "VALUES" => array("link" => GetMessage("F_MODE_TEMPLATE_LINK"), "forum" => GetMessage("F_MODE_TEMPLATE_FORUM"), "topic" => GetMessage("F_MODE_TEMPLATE_TOPIC")), "DEFAULT" => array("link"), "REFRESH" => "Y"), "URL_TEMPLATES_RSS" => array("PARENT" => "URL_TEMPLATES", "NAME" => GetMessage("F_RSS_TEMPLATE"), "TYPE" => "STRING", "DEFAULT" => "rss.php?TYPE=#TYPE#&MODE=#MODE#&IID=#IID#"), "CACHE_TIME" => array("DEFAULT" => "86400")));
if ($arCurrentValues["MODE_TEMPLATE"] != "link") {
$arComponentParameters["PARAMETERS"]["TYPE"] = array("PARENT" => "BASE", "NAME" => GetMessage("F_TYPE"), "TYPE" => "STRING", "DEFAULT" => '={$_REQUEST["TYPE"]}');
$arComponentParameters["PARAMETERS"]["COUNT"] = array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("F_COUNT"), "TYPE" => "STRING", "DEFAULT" => '30');
$arComponentParameters["PARAMETERS"]["MAX_FILE_SIZE"] = array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("F_MAX_FILE_SIZE"), "TYPE" => "STRING", "DEFAULT" => '5');
$arComponentParameters["PARAMETERS"]["TEMPLATES_TITLE_FORUMS"] = array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("F_TEMPLATES_TITLE_FORUMS") . GetMessage("F_TEMPLATES_HELP"), "TYPE" => "STRING", "DEFAULT" => '');
$arComponentParameters["PARAMETERS"]["TEMPLATES_TITLE_FORUM"] = array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("F_TEMPLATES_TITLE_FORUM") . GetMessage("F_TEMPLATES_HELP"), "TYPE" => "STRING", "DEFAULT" => '');
$arComponentParameters["PARAMETERS"]["TEMPLATES_TITLE_TOPIC"] = array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("F_TEMPLATES_TITLE_TOPIC") . GetMessage("F_TEMPLATES_HELP"), "TYPE" => "STRING", "DEFAULT" => '');
$arComponentParameters["PARAMETERS"]["DATE_TIME_FORMAT"] = CComponentUtil::GetDateTimeFormatField(GetMessage("F_DATE_TIME_FORMAT"), "ADDITIONAL_SETTINGS");
$arComponentParameters["PARAMETERS"]["URL_TEMPLATES_LIST"] = array("PARENT" => "URL_TEMPLATES", "NAME" => GetMessage("F_LIST_TEMPLATE"), "TYPE" => "STRING", "DEFAULT" => "list.php?FID=#FID#");
$arComponentParameters["PARAMETERS"]["URL_TEMPLATES_READ"] = array("PARENT" => "URL_TEMPLATES", "NAME" => GetMessage("F_READ_TEMPLATE"), "TYPE" => "STRING", "DEFAULT" => "read.php?FID=#FID#&TID=#TID#&MID=#MID#");
$arComponentParameters["PARAMETERS"]["URL_TEMPLATES_READ"] = array("PARENT" => "URL_TEMPLATES", "NAME" => GetMessage("F_READ_TEMPLATE"), "TYPE" => "STRING", "DEFAULT" => "message.php?FID=#FID#&TID=#TID#&MID=#MID#");
$arComponentParameters["PARAMETERS"]["URL_TEMPLATES_PROFILE_VIEW"] = array("PARENT" => "URL_TEMPLATES", "NAME" => GetMessage("F_PROFILE_VIEW_TEMPLATE"), "TYPE" => "STRING", "DEFAULT" => "profile_view.php?UID=#UID#");
}
开发者ID:Satariall,项目名称:izurit,代码行数:22,代码来源:.parameters.php
示例10: array
<?php
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
die;
}
$arComponentProps = CComponentUtil::GetComponentProps("bitrix:news.list", $arCurrentValues);
$arParameters = array("PARAMETERS" => array("IBLOCK_TYPE" => $arComponentProps["PARAMETERS"]["IBLOCK_TYPE"], "IBLOCK_ID" => $arComponentProps["PARAMETERS"]["IBLOCK_ID"], "LIST_URL" => array("NAME" => GetMessage("GD_OFFICIAL_URL_ALL"), "TYPE" => "STRING", "MULTIPLE" => "N", "DEFAULT" => "/about/index.php"), "DETAIL_URL" => array("NAME" => GetMessage("GD_OFFICIAL_URL_DETAIL"), "TYPE" => "STRING", "MULTIPLE" => "N", "DEFAULT" => "/about/official.php?ID=#ELEMENT_ID#"), "ACTIVE_DATE_FORMAT" => $arComponentProps["PARAMETERS"]["ACTIVE_DATE_FORMAT"], "CACHE_TYPE" => $arComponentProps["PARAMETERS"]["CACHE_TYPE"], "CACHE_TIME" => $arComponentProps["PARAMETERS"]["CACHE_TIME"]), "USER_PARAMETERS" => array("NEWS_COUNT" => $arComponentProps["PARAMETERS"]["NEWS_COUNT"], "DISPLAY_PREVIEW_TEXT" => array("NAME" => GetMessage("GD_OFFICIAL_SHOW_PREV"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y")));
$arParameters["USER_PARAMETERS"]["NEWS_COUNT"]["DEFAULT"] = 5;
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:8,代码来源:.parameters.php
示例11: htmlspecialcharsbx
?>
><?php
echo htmlspecialcharsbx($template["NAME"] . " (" . $showTemplateName . ")");
?>
</option>
<?php
}
?>
</select>
</td>
</tr>
<?php
}
//!empty($arComponentTemplates)
// Fetch tooltips
CComponentUtil::__IncludeLang($localPath, "/help/.tooltips.php");
$tooltips_path = $_SERVER["DOCUMENT_ROOT"] . $localPath . "/help/.tooltips.php";
$arTooltips = array();
if (file_exists($tooltips_path)) {
include $tooltips_path;
}
//check whether we have parameters without parent group
foreach ($arParameters as $prop) {
if (!array_key_exists("PARENT", $prop) || !array_key_exists($prop["PARENT"], $arParameterGroups)) {
$arParameterGroups["__additional_params"] = array("NAME" => GetMessage("comp_prop_additional"));
break;
}
}
$hiddenParamsHTML = '';
$prevGroupID = "";
foreach ($arParameterGroups as $groupID => $aGroup) {
开发者ID:spas-viktor,项目名称:books,代码行数:31,代码来源:component_props2.php
示例12: define
<?php
define('NO_KEEP_STATISTIC', true);
define('NO_AGENT_STATISTIC', true);
define('NOT_CHECK_PERMISSIONS', true);
require $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/include/prolog_admin_before.php';
CComponentUtil::__IncludeLang(dirname($_SERVER["SCRIPT_NAME"]), "/ajax.php");
$arResult = array();
if (!CModule::IncludeModule("bitrixcloud")) {
$arResult["ERROR"] = GetMessage("BCLMMD_BC_NOT_INSTALLED");
}
if (!$USER->IsAdmin() || !check_bitrix_sessid()) {
$arResult["ERROR"] = GetMessage("BCLMMD_ACCESS_DENIED");
}
if (!isset($arResult["ERROR"])) {
$action = isset($_REQUEST['action']) ? trim($_REQUEST['action']) : '';
$domain = isset($_REQUEST['domain']) ? trim($_REQUEST['domain']) : '';
$monitoring = CBitrixCloudMonitoring::getInstance();
switch ($action) {
case 'delete':
$strError = $monitoring->stopMonitoring($domain);
if (strlen($strError) > 0) {
$arResult["ERROR"] = $strError;
}
break;
}
if (isset($arResult["ERROR"])) {
$arResult["RESULT"] = "ERROR";
} else {
$arResult["RESULT"] = "OK";
}
开发者ID:rasuldev,项目名称:torino,代码行数:31,代码来源:ajax.php
示例13: array
<?php
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
die;
}
if (!CModule::IncludeModule("forum")) {
return;
}
$arComponentParameters = array("PARAMETERS" => array("RESTART" => array("PARENT" => "DATA_SOURCE", "NAME" => GetMessage("SEARCH_RESTART"), "TYPE" => "CHECKBOX", "DEFAULT" => "N"), "NO_WORD_LOGIC" => array("PARENT" => "DATA_SOURCE", "NAME" => GetMessage("CP_BSP_NO_WORD_LOGIC"), "TYPE" => "CHECKBOX", "DEFAULT" => "N"), "URL_TEMPLATES_INDEX" => array("PARENT" => "URL_TEMPLATES", "NAME" => GetMessage("F_INDEX_TEMPLATE"), "TYPE" => "STRING", "DEFAULT" => "index.php"), "URL_TEMPLATES_READ" => array("PARENT" => "URL_TEMPLATES", "NAME" => GetMessage("F_READ_TEMPLATE"), "TYPE" => "STRING", "DEFAULT" => "read.php?FID=#FID#&TID=#TID#"), "URL_TEMPLATES_MESSAGE" => array("PARENT" => "URL_TEMPLATES", "NAME" => GetMessage("F_MESSAGE_TEMPLATE"), "TYPE" => "STRING", "DEFAULT" => "message.php?FID=#FID#&TID=#TID#&MID=#MID#"), "FID_RANGE" => CForumParameters::GetForumsMultiSelect(GetMessage("F_DEFAULT_FID"), "ADDITIONAL_SETTINGS"), "DATE_FORMAT" => CComponentUtil::GetDateFormatField(GetMessage("F_DATE_FORMAT"), "ADDITIONAL_SETTINGS"), "TOPICS_PER_PAGE" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("F_TOPICS_PER_PAGE"), "TYPE" => "STRING", "DEFAULT" => intVal(COption::GetOptionString("forum", "TOPICS_PER_PAGE", "10"))), "PAGE_NAVIGATION_TEMPLATE" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("F_PAGE_NAVIGATION_TEMPLATE"), "TYPE" => "STRING", "DEFAULT" => ""), "PAGE_NAVIGATION_WINDOW" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("F_PAGE_NAVIGATION_WINDOW"), "TYPE" => "STRING", "DEFAULT" => "11"), "SET_NAVIGATION" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("F_SET_NAVIGATION"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y"), "CACHE_TIME" => array(), "SET_TITLE" => array()));
开发者ID:rasuldev,项目名称:torino,代码行数:9,代码来源:.parameters.php
示例14: __InTaskInitPerms
}
}
if (StrLen($arResult["FatalError"]) <= 0) {
$arResult["Perms"] = __InTaskInitPerms($taskType, $ownerId);
if (!$arResult["Perms"]["view"]) {
$arResult["FatalError"] .= GetMessage("INTV_NO_SONET_PERMS") . ".";
}
}
if (StrLen($arResult["FatalError"]) <= 0) {
$arResult["TaskFields"] = __IntaskInitTaskFields($iblockId, $taskType, $ownerId, $arParams["TASKS_FIELDS_SHOW"]);
if (!$arResult["TaskFields"] || !Is_Array($arResult["TaskFields"]) || Count($arResult["TaskFields"]) <= 0) {
$arResult["FatalError"] = GetMessage("INTV_INTERNAL_ERROR") . ".";
}
}
if (StrLen($arResult["FatalError"]) <= 0) {
$arUserTemplatesList = CComponentUtil::GetTemplatesList("bitrix:intranet.tasks.view", SITE_TEMPLATE_ID);
$userTemplateId = Trim($_REQUEST["user_template_id"]);
$userSettingsId = $action == "edit" ? $viewId : IntVal($_REQUEST["user_settings_id"]);
if (StrLen($userTemplateId) > 0) {
$bCorrectTemplate = false;
foreach ($arUserTemplatesList as $arUserTemplate) {
if ($arUserTemplate["NAME"] == $userTemplateId) {
$bCorrectTemplate = true;
break;
}
}
if (!$bCorrectTemplate) {
$userTemplateId = "";
}
}
$arUserSettings = false;
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php
示例15: GetCompProperties
function GetCompProperties($name, $template = '', $siteTemplateId = '', $arCurVals = array())
{
$stid = $siteTemplateId;
$arProps = CComponentUtil::GetComponentProps($name, $arCurVals);
$arTemplateProps = CComponentUtil::GetTemplateProps($name, $template, $stid, $arCurVals);
return $arProps['PARAMETERS'] + $arTemplateProps;
}
开发者ID:Satariall,项目名称:izurit,代码行数:7,代码来源:editor_utils.php
示例16: array
<?php
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
die;
}
CModule::IncludeModule('intranet');
$arComponentParameters = array('GROUPS' => array(), 'PARAMETERS' => array('NUM_USERS' => array('TYPE' => 'STRING', 'MULTIPLE' => 'N', 'DEFAULT' => '50', 'NAME' => GetMessage('INTR_ISBN_PARAM_NUM_USERS'), 'PARENT' => 'BASE'), 'NAME_TEMPLATE' => array('TYPE' => 'LIST', 'NAME' => GetMessage('INTR_ISH_PARAM_NAME_TEMPLATE'), 'VALUES' => CComponentUtil::GetDefaultNameTemplates(), 'MULTIPLE' => 'N', 'ADDITIONAL_VALUES' => 'Y', 'DEFAULT' => "", 'PARENT' => 'BASE'), "SHOW_LOGIN" => array("NAME" => GetMessage("INTR_ISH_PARAM_SHOW_LOGIN"), "TYPE" => "CHECKBOX", "MULTIPLE" => "N", "VALUE" => "Y", "DEFAULT" => "Y", "PARENT" => "BASE"), 'PM_URL' => array('TYPE' => 'STRING', 'DEFAULT' => '/company/personal/messages/chat/#USER_ID#/', 'NAME' => GetMessage('INTR_ISH_PARAM_PM_URL'), 'PARENT' => 'BASE'), 'PATH_TO_CONPANY_DEPARTMENT' => array('TYPE' => 'STRING', 'DEFAULT' => '/company/structure.php?set_filter_structure=Y&structure_UF_DEPARTMENT=#ID#', 'NAME' => GetMessage('INTR_ISH_PARAM_PATH_TO_CONPANY_DEPARTMENT'), 'PARENT' => 'BASE'), "DATE_FORMAT" => CComponentUtil::GetDateFormatField(GetMessage("INTR_ISH_PARAM_DATE_FORMAT"), 'ADDITIONAL_SETTINGS'), "DATE_FORMAT_NO_YEAR" => CComponentUtil::GetDateFormatField(GetMessage("INTR_ISH_PARAM_DATE_FORMAT_NO_YEAR"), 'ADDITIONAL_SETTINGS', true), "DATE_TIME_FORMAT" => CComponentUtil::GetDateTimeFormatField(GetMessage("INTR_ISH_PARAM_DATE_TIME_FORMAT"), 'ADDITIONAL_SETTINGS'), "SHOW_YEAR" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("INTR_ISH_PARAM_SHOW_YEAR"), "TYPE" => "LIST", "VALUES" => array("Y" => GetMessage("INTR_ISH_PARAM_SHOW_YEAR_VALUE_Y"), "M" => GetMessage("INTR_ISH_PARAM_SHOW_YEAR_VALUE_M"), "N" => GetMessage("INTR_ISH_PARAM_SHOW_YEAR_VALUE_N")), "MULTIPLE" => "N", "DEFAULT" => "Y"), "CACHE_TIME" => array("DEFAULT" => 3600)));
if (IsModuleInstalled("video")) {
$arComponentParameters["PARAMETERS"]["PATH_TO_VIDEO_CALL"] = array("NAME" => GetMessage("INTR_ISH_PARAM_PATH_TO_VIDEO_CALL"), "TYPE" => "STRING", "DEFAULT" => "/company/personal/video/#USER_ID#/", "PARENT" => "ADDITIONAL_SETTINGS");
}
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:10,代码来源:.parameters.php
示例17: forumTextParser
${"parser_" . LANGUAGE_ID} = new forumTextParser(LANGUAGE_ID);
}
$POST_MESSAGE = ${"parser_" . LANGUAGE_ID}->convert4ma
|
请发表评论