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


PHP CTextParser::closeTags方法代码示例

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


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

示例1: getControlHtml

    function getControlHtml($name, $value, $maxLength = 255)
    {
        global $APPLICATION;
        $result = '';
        if (!$this->initHtml) {
            $this->initHtml = true;
            $APPLICATION->AddHeadScript('/bitrix/js/iblock/iblock_edit.js');
            $result .= '<div id="popup_editor_start" style="display: none">';
            ob_start();
            $LHE = new CLightHTMLEditor();
            $LHE->Show(array('height' => $height - 40, 'width' => '100%', 'content' => '', 'bResizable' => true, 'bUseFileDialogs' => false, 'bFloatingToolbar' => false, 'bArisingToolbar' => true, 'bAutoResize' => true, 'bSaveOnBlur' => true, 'bInitByJS' => true, 'jsObjName' => 'popup_editor', 'toolbarConfig' => array('Bold', 'Italic', 'Underline', 'Strike', 'CreateLink', 'DeleteLink', 'Source', 'BackColor', 'ForeColor'), 'id' => 'popup_editor_id'));
            $result .= ob_get_contents();
            ob_end_clean();
            $result .= '</div>';
            $result .= '<script>
				var popup_editor_dialog;
				var popup_editor_manager = new JCPopupEditor(' . $this->width . ', ' . $this->height . ');
			</script>';
        }
        $value = trim($value);
        if ($value) {
            $value = CTextParser::closeTags($value);
        }
        $hiddenId = preg_replace('/[^a-zA-Z0-9_-]/', '-', $name);
        $demoId = $hiddenId . '-DEMO';
        $result .= '<input
			type="hidden"
			value="' . htmlspecialcharsbx($value) . '"
			name="' . htmlspecialcharsbx($name) . '"
			id="' . htmlspecialcharsbx($hiddenId) . '"
			onchange="' . htmlspecialcharsbx("BX('" . CUtil::JSEscape($demoId) . "').innerHTML = this.value") . '"
		>';
        $result .= '<div id="' . htmlspecialcharsbx($demoId) . '">' . $value . '</div>';
        $jsLink = 'javascript:popup_editor_manager.openEditor(\'' . CUtil::JSEscape($hiddenId) . '\', ' . intval($maxLength) . ')';
        $result .= '<a class="bx-action-href" href="' . htmlspecialcharsbx($jsLink) . '">' . GetMessage('IBLOCK_AT_POPUP_EDIT') . '</a>';
        return $result;
    }
开发者ID:Satariall,项目名称:izurit,代码行数:37,代码来源:admin_tools.php

示例2: getIBlockItems

 public function getIBlockItems($IBLOCK_ID)
 {
     $items = array();
     foreach (CIBlockSectionPropertyLink::GetArray($IBLOCK_ID, $this->SECTION_ID) as $PID => $arLink) {
         if ($arLink["SMART_FILTER"] !== "Y") {
             continue;
         }
         if ($arLink['FILTER_HINT'] != '') {
             $arLink['FILTER_HINT'] = CTextParser::closeTags($arLink['FILTER_HINT']);
         }
         $rsProperty = CIBlockProperty::GetByID($PID);
         $arProperty = $rsProperty->Fetch();
         if ($arProperty) {
             $items[$arProperty["ID"]] = array("ID" => $arProperty["ID"], "IBLOCK_ID" => $arProperty["IBLOCK_ID"], "CODE" => $arProperty["CODE"], "NAME" => $arProperty["NAME"], "PROPERTY_TYPE" => $arProperty["PROPERTY_TYPE"], "USER_TYPE" => $arProperty["USER_TYPE"], "USER_TYPE_SETTINGS" => $arProperty["USER_TYPE_SETTINGS"], "DISPLAY_TYPE" => $arLink["DISPLAY_TYPE"], "DISPLAY_EXPANDED" => $arLink["DISPLAY_EXPANDED"], "FILTER_HINT" => $arLink["FILTER_HINT"], "VALUES" => array());
             if ($arProperty["PROPERTY_TYPE"] == "N" || $arLink["DISPLAY_TYPE"] == "U") {
                 $minID = $this->SAFE_FILTER_NAME . '_' . $arProperty['ID'] . '_MIN';
                 $maxID = $this->SAFE_FILTER_NAME . '_' . $arProperty['ID'] . '_MAX';
                 $items[$arProperty["ID"]]["VALUES"] = array("MIN" => array("CONTROL_ID" => $minID, "CONTROL_NAME" => $minID), "MAX" => array("CONTROL_ID" => $maxID, "CONTROL_NAME" => $maxID));
             }
         }
     }
     return $items;
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:23,代码来源:class.php

示例3: SelectBoxFromArray

            echo SelectBoxFromArray('SECTION_PROPERTY[' . $arProp['ID'] . '][DISPLAY_TYPE]', array("REFERENCE_ID" => array_keys($displayTypes), "REFERENCE" => array_values($displayTypes)), $arLink["DISPLAY_TYPE"], '', '');
        } else {
            echo '&nbsp;';
        }
        ?>
				</td>
				<td style="text-align:center"><?php 
        echo '<input type="checkbox" value="Y" ' . (is_array($arLink) && $arLink["INHERITED"] == "Y" ? 'disabled="disabled"' : '') . ' name="SECTION_PROPERTY[' . $arProp['ID'] . '][DISPLAY_EXPANDED]" ' . ($arLink["DISPLAY_EXPANDED"] == "Y" ? 'checked="checked"' : '') . '>';
        ?>
</td>
				<td>
				<?php 
        if (!is_array($arLink) || $arLink["INHERITED"] == "N") {
            echo $editor->getControlHtml('SECTION_PROPERTY[' . $arProp['ID'] . '][FILTER_HINT]', $arLink['FILTER_HINT'], 255);
        } elseif ($arLink['FILTER_HINT'] != '') {
            echo CTextParser::closeTags($arLink['FILTER_HINT']);
        } else {
            echo '&nbsp;';
        }
        ?>
</td>
				<td align="left"><?php 
        if (!is_array($arLink) || $arLink["INHERITED"] == "N") {
            echo '<a class="bx-action-href" href="javascript:deleteSectionProperty(' . $arProp['ID'] . ', \'select_SKU_SECTION_PROPERTY\', \'shadow_SKU_SECTION_PROPERTY\', \'table_SKU_SECTION_PROPERTY\')">' . GetMessage("CAT_CEDIT_PROP_TABLE_ACTION_HIDE") . '</a>';
        } else {
            echo '&nbsp;';
        }
        ?>
</td>
			</tr>
			<?php 
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:cat_catalog_edit.php


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