本文整理汇总了PHP中glossary_start_tag函数的典型用法代码示例。如果您正苦于以下问题:PHP glossary_start_tag函数的具体用法?PHP glossary_start_tag怎么用?PHP glossary_start_tag使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了glossary_start_tag函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: glossary_full_tag
/**
* Return the start tag, the contents and the end tag
*
* @global object
* @param string $tag
* @param int $level
* @param bool $endline
* @param string $content
* @return string
*/
function glossary_full_tag($tag,$level=0,$endline=true,$content) {
global $CFG;
$st = glossary_start_tag($tag,$level,$endline);
$co = preg_replace("/\r\n|\r/", "\n", s($content));
$et = glossary_end_tag($tag,0,true);
return $st.$co.$et;
}
示例2: glossary_xml_export_files
/**
* Prepares file area to export as part of XML export
*
* @param string $tag XML tag to use for the group
* @param int $taglevel
* @param int $contextid
* @param string $filearea
* @param int $itemid
* @return string
*/
function glossary_xml_export_files($tag, $taglevel, $contextid, $filearea, $itemid)
{
$co = '';
$fs = get_file_storage();
if ($files = $fs->get_area_files($contextid, 'mod_glossary', $filearea, $itemid, 'itemid,filepath,filename', false)) {
$co .= glossary_start_tag($tag, $taglevel, true);
foreach ($files as $file) {
$co .= glossary_start_tag('FILE', $taglevel + 1, true);
$co .= glossary_full_tag('FILENAME', $taglevel + 2, false, $file->get_filename());
$co .= glossary_full_tag('FILEPATH', $taglevel + 2, false, $file->get_filepath());
$co .= glossary_full_tag('CONTENTS', $taglevel + 2, false, base64_encode($file->get_content()));
$co .= glossary_end_tag('FILE', $taglevel + 1);
}
$co .= glossary_end_tag($tag, $taglevel);
}
return $co;
}