当前位置: 首页>>代码示例>>PHP>>正文


PHP CComponentUtil::GetTemplateProps方法代码示例

本文整理汇总了PHP中CComponentUtil::GetTemplateProps方法的典型用法代码示例。如果您正苦于以下问题:PHP CComponentUtil::GetTemplateProps方法的具体用法?PHP CComponentUtil::GetTemplateProps怎么用?PHP CComponentUtil::GetTemplateProps使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CComponentUtil的用法示例。


在下文中一共展示了CComponentUtil::GetTemplateProps方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: 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

示例2: GetProperties

function GetProperties($componentName, $curTemplate = '')
{
	$stid = (isset($_GET['stid'])) ? $_GET['stid'] : '';
	$curTemplate = (!$curTemplate || $curTemplate == '.default') ? '' : CUtil::JSEscape($curTemplate);
	$arTemplates = CComponentUtil::GetTemplatesList($componentName, $stid);
	$arCurVals = isset($_POST['curval']) ? CEditorUtils::UnJSEscapeArray($_POST['curval']) : Array();
	$loadHelp = (isset($_GET['loadhelp']) && $_GET['loadhelp']=="Y") ? true : false;

	if (is_array($arTemplates))
	{
		foreach ($arTemplates as $k => $arTemplate)
		{
			push2arComp2Templates($arTemplate['NAME'], $arTemplate['TEMPLATE'], $arTemplate['TITLE'], $arTemplate['DESCRIPTION']);
			$tName = (!$arTemplate['NAME'] || $arTemplate['NAME'] == '.default') ? '' : $arTemplate['NAME'];
			if ($tName == $curTemplate)
			{
				$arTemplateProps = CComponentUtil::GetTemplateProps($componentName, $arTemplate['NAME'], $stid, $arCurVals);
				if (is_array($arTemplateProps))
					foreach ($arTemplateProps as $k => $arTemplateProp)
						push2arComp2TemplateProps($componentName,$k,$arTemplateProp);
			}
		}
	}

	$arProps = CComponentUtil::GetComponentProps($componentName, $arCurVals);
	if ($loadHelp && is_array($arProps['PARAMETERS']))
		fetchPropsHelp($componentName);

	$bGroup = (isset($arProps['GROUPS']) && count($arProps['GROUPS']) > 0);
	if (is_array($arProps['GROUPS']))
	{
		foreach ($arProps['GROUPS'] as $k => $arGroup)
		{
			?>window.arComp2Groups.push({name: '<?php 
echo CUtil::JSEscape($k);
?>
', title: '<?php 
echo CUtil::JSEscape($arGroup['NAME']);
?>
'});<?
		}
	}

	if (is_array($arProps['PARAMETERS']))
		foreach ($arProps['PARAMETERS'] as $k => $arParam)
			push2arComp2Props($k, $arParam, (($bGroup) ? $arProps['GROUPS'] : false));
}
开发者ID:ASDAFF,项目名称:open_bx,代码行数:47,代码来源:fileman_load_comp2_params.php

示例3: 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

示例4: GetMessage

            $strWarning .= GetMessage("comp_prop_err_comp") . "<br>";
        } else {
            $arValues = $arComponent["DATA"]["PARAMS"];
        }
    }
}
if ($strWarning == "") {
    if ($_SERVER["REQUEST_METHOD"] == "POST" && $_GET["action"] == "refresh") {
        // parameters were changed by "ok" button
        // we need to refresh the component description with new values
        $arValues = array_merge($arValues, $_POST);
    }
    $curTemplate = isset($_POST["NEW_COMPONENT_TEMPLATE"]) ? $_POST["NEW_COMPONENT_TEMPLATE"] : $_GET["component_template"];
    $arComponentDescription = CComponentUtil::GetComponentDescr($_GET["component_name"]);
    $arComponentParameters = CComponentUtil::GetComponentProps($_GET["component_name"], $arValues);
    $arTemplateParameters = CComponentUtil::GetTemplateProps($_GET["component_name"], $curTemplate, $_GET["template_id"], $arValues);
    if (isset($arComponentParameters["GROUPS"]) && is_array($arComponentParameters["GROUPS"])) {
        $arParameterGroups = $arParameterGroups + $arComponentParameters["GROUPS"];
    }
    $arParameters = array();
    if (isset($arComponentParameters["PARAMETERS"]) && is_array($arComponentParameters["PARAMETERS"])) {
        $arParameters = $arParameters + $arComponentParameters["PARAMETERS"];
    }
    if (isset($arTemplateParameters) && is_array($arTemplateParameters)) {
        $arParameters = $arParameters + $arTemplateParameters;
    }
    $arComponentTemplates = CComponentUtil::GetTemplatesList($_GET["component_name"], $_GET["template_id"]);
    /* save parameters to file */
    if ($_SERVER["REQUEST_METHOD"] == "POST" && $_GET["action"] == "save" && $arComponent !== false && $arComponentDescription !== false) {
        if (!check_bitrix_sessid()) {
            $strWarning .= GetMessage("comp_prop_err_save") . "<br>";
开发者ID:spas-viktor,项目名称:books,代码行数:31,代码来源:component_props2.php

示例5: 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

示例6: GetComponentParams

	public static function GetComponentParams($name, $siteTemplate = '', $template = '', $curValues = array(), $loadHelp = true)
	{
		$template = (!$template || $template == '.default') ? '' : CUtil::JSEscape($template);
		$arTemplates = CComponentUtil::GetTemplatesList($name, $siteTemplate);

		$result = array(
			'groups' => array(),
			'templates' => array(),
			'props' => array(),
			'template_props' => array()
		);

		$arProps = CComponentUtil::GetComponentProps($name, $curValues);

		if (is_array($arTemplates))
		{
			foreach ($arTemplates as $k => $arTemplate)
			{
				$result['templates'][] = array(
					'name' => $arTemplate['NAME'],
					'template' => $arTemplate['TEMPLATE'],
					'title' => $arTemplate['TITLE'],
					'description' => $arTemplate['DESCRIPTION'],
				);

				$tName = (!$arTemplate['NAME'] || $arTemplate['NAME'] == '.default') ? '' : $arTemplate['NAME'];
				if ($tName == $template)
				{
					$arTemplateProps = CComponentUtil::GetTemplateProps($name, $arTemplate['NAME'], $siteTemplate, $curValues);

					if (is_array($arTemplateProps))
					{
						foreach ($arTemplateProps as $k => $arTemplateProp)
						{
							$result['templ_props'][] = self::_HandleComponentParam($k, $arTemplateProp, $arProps['GROUPS']);
						}
					}
				}
			}
		}

		//if ($loadHelp && is_array($arProps['PARAMETERS']))
		//	fetchPropsHelp($name);

		if (is_array($arProps['GROUPS']))
		{
			foreach ($arProps['GROUPS'] as $k => $arGroup)
			{
				$result['templ_props'][] = array(
					'name' => $k,
					'title' => $arGroup['NAME']
				);
			}
		}

		if (is_array($arProps['PARAMETERS']))
		{
			foreach ($arProps['PARAMETERS'] as $k => $arParam)
			{
				$result['properties'][] = self::_HandleComponentParam($k, $arParam, $arProps['GROUPS']);
			}
		}

		return $result;
	}
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:65,代码来源:html_editor.php

示例7: array

 $arParams = $arRes['PARAMS'];
 $arPHPparams = array();
 //all php fragments wraped by ={}
 foreach ($arParams as $param_name => $paramval) {
     if (substr($paramval, 0, 2) == '={' && substr($paramval, -1) == '}') {
         $arPHPparams[] = $param_name;
     }
 }
 $len = count($arPHPparams);
 $br = "\r\n";
 $code = '$APPLICATION->IncludeComponent(' . $br . "\t" . '"' . $comp_name . '",' . $br . "\t" . '"' . $template_name . '",' . $br;
 // If exist at least one parameter with php code inside
 if (count($arParams) > 0) {
     // Get array with description of component params
     $arCompParams = CComponentUtil::GetComponentProps($comp_name);
     $arTemplParams = CComponentUtil::GetTemplateProps($comp_name, $template_name, $template);
     $arParameters = array();
     if (isset($arCompParams["PARAMETERS"]) && is_array($arCompParams["PARAMETERS"])) {
         $arParameters = $arParameters + $arCompParams["PARAMETERS"];
     }
     if (is_array($arTemplParams)) {
         $arParameters = $arParameters + $arTemplParams;
     }
     // Replace values from 'DEFAULT'
     for ($e = 0; $e < $len; $e++) {
         $par_name = $arPHPparams[$e];
         $arParams[$par_name] = isset($arParameters[$par_name]['DEFAULT']) ? $arParameters[$par_name]['DEFAULT'] : '';
     }
     CComponentUtil::PrepareVariables($arParams);
     //ReturnPHPStr
     $params = PHPParser::ReturnPHPStr2($arParams, $arParameters);
开发者ID:spas-viktor,项目名称:books,代码行数:31,代码来源:template_create_preview.php

示例8: ProcessLPA

 function ProcessLPA($filesrc = false, $old_filesrc = false)
 {
     if ($filesrc === false) {
         return '';
     }
     // Find all php fragments in $filesrc and:
     // 	1. Kill all non-component 2.0 fragments
     // 	2. Get and check params of components
     $arPHP = PHPParser::ParseFile($filesrc);
     $l = count($arPHP);
     if ($l > 0) {
         $new_filesrc = '';
         $end = 0;
         for ($n = 0; $n < $l; $n++) {
             $start = $arPHP[$n][0];
             $new_filesrc .= CMain::EncodePHPTags(substr($filesrc, $end, $start - $end));
             $end = $arPHP[$n][1];
             //Trim php tags
             $src = $arPHP[$n][2];
             if (substr($src, 0, 5) == "<?php") {
                 $src = '<?' . substr($src, 5);
             }
             //If it's Component 2 - we handle it's params, non components2 will be erased
             $comp2_begin = '<?$APPLICATION->INCLUDECOMPONENT(';
             if (strtoupper(substr($src, 0, strlen($comp2_begin))) == $comp2_begin) {
                 $arRes = PHPParser::CheckForComponent2($src);
                 if ($arRes) {
                     $comp_name = CMain::_ReplaceNonLatin($arRes['COMPONENT_NAME']);
                     $template_name = CMain::_ReplaceNonLatin($arRes['TEMPLATE_NAME']);
                     $arParams = $arRes['PARAMS'];
                     $arPHPparams = array();
                     CMain::LPAComponentChecker($arParams, $arPHPparams);
                     $len = count($arPHPparams);
                     $br = "\r\n";
                     $code = '$APPLICATION->IncludeComponent(' . $br . "\t" . '"' . $comp_name . '",' . $br . "\t" . '"' . $template_name . '",' . $br;
                     // If exist at least one parameter with php code inside
                     if (count($arParams) > 0) {
                         // Get array with description of component params
                         $arCompParams = CComponentUtil::GetComponentProps($comp_name);
                         $arTemplParams = CComponentUtil::GetTemplateProps($comp_name, $template_name);
                         $arParameters = array();
                         if (isset($arCompParams["PARAMETERS"]) && is_array($arCompParams["PARAMETERS"])) {
                             $arParameters = $arParameters + $arCompParams["PARAMETERS"];
                         }
                         if (is_array($arTemplParams)) {
                             $arParameters = $arParameters + $arTemplParams;
                         }
                         // Replace values from 'DEFAULT'
                         for ($e = 0; $e < $len; $e++) {
                             $par_name = $arPHPparams[$e];
                             $arParams[$par_name] = isset($arParameters[$par_name]['DEFAULT']) ? $arParameters[$par_name]['DEFAULT'] : '';
                         }
                         //ReturnPHPStr
                         $params = PHPParser::ReturnPHPStr2($arParams, $arParameters);
                         $code .= "\t" . 'array(' . $br . "\t" . $params . $br . "\t" . ')';
                     } else {
                         $code .= "\t" . 'array()';
                     }
                     $parent_comp = CMain::_ReplaceNonLatin($arRes['PARENT_COMP']);
                     $arExParams_ = $arRes['FUNCTION_PARAMS'];
                     $bEx = isset($arExParams_) && is_array($arExParams_) && count($arExParams_) > 0;
                     if (!$parent_comp || strtolower($parent_comp) == 'false') {
                         $parent_comp = false;
                     }
                     if ($parent_comp) {
                         if ($parent_comp == 'true' || intVal($parent_comp) == $parent_comp) {
                             $code .= ',' . $br . "\t" . $parent_comp;
                         } else {
                             $code .= ',' . $br . "\t\"" . $parent_comp . '"';
                         }
                     }
                     if ($bEx) {
                         if (!$parent_comp) {
                             $code .= ',' . $br . "\tfalse";
                         }
                         $arExParams = array();
                         foreach ($arExParams_ as $k => $v) {
                             $k = CMain::_ReplaceNonLatin($k);
                             $v = CMain::_ReplaceNonLatin($v);
                             if (strlen($k) > 0 && strlen($v) > 0) {
                                 $arExParams[$k] = $v;
                             }
                         }
                         //CComponentUtil::PrepareVariables($arExParams);
                         $exParams = PHPParser::ReturnPHPStr2($arExParams);
                         $code .= ',' . $br . "\tarray(" . $exParams . ')';
                     }
                     $code .= $br . ');';
                     $code = '<?' . $code . '?>';
                     $new_filesrc .= $code;
                 }
             }
         }
         $new_filesrc .= CMain::EncodePHPTags(substr($filesrc, $end));
         $filesrc = $new_filesrc;
     } else {
         $filesrc = CMain::EncodePHPTags($filesrc);
     }
     if (strpos($filesrc, '#PHP') !== false && $old_filesrc !== false) {
         // Get array of PHP scripts from old saved file
//.........这里部分代码省略.........
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:101,代码来源:main.php

示例9: isset

}
if ($str_AD_TYPE == 'template') {
    $arCurVal = isset($str_TEMPLATE['PROPS']) ? $str_TEMPLATE['PROPS'] : $_POST['TEMPLATE_PROP'];
    $templateName = $str_TEMPLATE["NAME"] ? $str_TEMPLATE["NAME"] : $_POST['TEMPLATE_NAME'];
    $templateMode = $str_TEMPLATE['MODE'] ? $str_TEMPLATE['MODE'] : $_POST['EXTENDED_MODE'];
    if (count($arCurVal) > 0) {
        foreach ($arCurVal as $id => $prop) {
            $arCurVal[$id]['EXTENDED_MODE'] = $templateMode;
            $arPropsTemplate[$id] = CComponentUtil::GetTemplateProps('bitrix:advertising.banner.view', $templateName, '', $arCurVal[$id]);
            uasort($arPropsTemplate[$id]["PARAMETERS"], 'pr_comp');
        }
    } else {
        if (empty($arCurVal)) {
            $arCurVal = array('EXTENDED_MODE' => $templateMode);
        }
        $arPropsTemplate[0] = CComponentUtil::GetTemplateProps('bitrix:advertising.banner.view', $templateName, '', $arCurVal);
        uasort($arPropsTemplate[0]["PARAMETERS"], 'pr_comp');
    }
    $defaultProps = array();
    foreach ($arPropsTemplate as $i => $k) {
        foreach ($k['PARAMETERS'] as $name => $prop) {
            $html = '';
            $defaultProps[$name] = $prop['DEFAULT'];
            if ($prop['TYPE'] == 'IMAGE') {
                $file_ID = is_array($str_TEMPLATE_FILES) && isset($str_TEMPLATE_FILES[$i][$name]) && $str_TEMPLATE_FILES[$i][$name] !== 'null' ? intVal($str_TEMPLATE_FILES[$i][$name]) : 0;
                if ($bCopy) {
                    $html .= '<input type=\'hidden\' name=\'TEMPLATE_FILES_copy[' . $i . '_' . $name . ']\' value=\'' . $file_ID . '\'>';
                }
                ob_start();
                if (class_exists('\\Bitrix\\Main\\UI\\FileInput', true)) {
                    echo \Bitrix\Main\UI\FileInput::createInstance(array("name" => "TEMPLATE_FILES[" . $i . '_' . $name . "]", "description" => true, "allowUpload" => "I", "maxCount" => 1) + ($isEditMode ? array("medialib" => true, "fileDialog" => true, "cloud" => true, "upload" => true) : array("delete" => false, "edit" => false)))->show($file_ID);
开发者ID:webgksupport,项目名称:alpina,代码行数:31,代码来源:adv_banner_edit.php

示例10: isset

require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_before.php";
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/fileman/prolog.php";
if (!$USER->CanDoOperation('fileman_view_file_structure') && !$USER->CanDoOperation('edit_other_settings')) {
    $APPLICATION->AuthForm(GetMessage("ACCESS_DENIED"));
}
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/fileman/include.php";
if (CModule::IncludeModule("compression")) {
    CCompress::Disable2048Spaces();
}
if (isset($_GET['cname']) && isset($_GET['stid']) && isset($_GET['tname']) && isset($_GET['mode']) && $_GET['mode'] == 'params') {
    ?>
<script>
window.arComp2TemplateProps = [];
<?php 
    $arCurrentValues = isset($_POST['curval']) ? $_POST['curval'] : array();
    $arTemplateProps = CComponentUtil::GetTemplateProps($_GET['cname'], $_GET['tname'], $_GET['stid'], $arCurrentValues);
    foreach ($arTemplateProps as $paramName => $arTemplateProp) {
        ?>
var tempAr2 = {};
tempAr2.param_name = '<?php 
        echo CUtil::JSEscape($paramName);
        ?>
';
<?php 
        foreach ($arTemplateProp as $k => $prop) {
            if (is_array($prop)) {
                ?>
tempAr2.<?php 
                echo $k;
                ?>
 = {<?php 
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:fileman_load_templates.php

示例11: GetMessage

        }
        if ($nLineTo > $src_line) {
            break;
        }
    }
}
if ($arComponent === false) {
    $strWarning .= GetMessage("comp_prop_err_comp") . "<br>";
}
$arComponentDescription = array();
$arTemplatesList = array();
$templateSiteTemplate = "";
if ($strWarning == "") {
    $arComponentDescription = CComponentUtil::GetComponentDescr($_GET["component_name"]);
    $arComponentParameters = CComponentUtil::GetComponentProps($_GET["component_name"], $arComponent["DATA"]["PARAMS"]);
    $arTemplateParameters = CComponentUtil::GetTemplateProps($_GET["component_name"], $_GET["component_template"], $_GET["template_id"], $arComponent["DATA"]["PARAMS"]);
    $arParameterGroups = array();
    if (isset($arComponentParameters["GROUPS"]) && is_array($arComponentParameters["GROUPS"])) {
        $arParameterGroups = $arParameterGroups + $arComponentParameters["GROUPS"];
    }
    if (isset($arTemplateParameters) && is_array($arTemplateParameters)) {
        $arParameterGroups = $arParameterGroups + array("TEMPLATE" => array("NAME" => GetMessage("comp_templ_template")));
    }
    $arParameters = array();
    if (isset($arComponentParameters["PARAMETERS"]) && is_array($arComponentParameters["PARAMETERS"])) {
        $arParameters = $arParameters + $arComponentParameters["PARAMETERS"];
    }
    if (isset($arTemplateParameters) && is_array($arTemplateParameters)) {
        $arParameters = $arParameters + $arTemplateParameters;
    }
    $arTemplatesList = CComponentUtil::GetTemplatesList($_GET["component_name"], $_GET["template_id"]);
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:template_copy.php


注:本文中的CComponentUtil::GetTemplateProps方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。