本文整理匯總了PHP中ilTree::getFilteredSubTree方法的典型用法代碼示例。如果您正苦於以下問題:PHP ilTree::getFilteredSubTree方法的具體用法?PHP ilTree::getFilteredSubTree怎麽用?PHP ilTree::getFilteredSubTree使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ilTree
的用法示例。
在下文中一共展示了ilTree::getFilteredSubTree方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: exportXMLStructureObjects
/**
* export structure objects to xml (see ilias_co.dtd)
*
* @param object $a_xml_writer ilXmlWriter object that receives the
* xml data
*/
function exportXMLStructureObjects(&$a_xml_writer, $a_inst, &$expLog)
{
include_once "Services/MetaData/classes/class.ilMD2XML.php";
$tree = new ilTree($this->getId());
$tree->setTableNames('sahs_sc13_tree', 'sahs_sc13_tree_node');
$tree->setTreeTablePK("slm_id");
$a_xml_writer->xmlStartTag("StructureObject");
foreach ($tree->getFilteredSubTree($tree->getRootId(), array('page')) as $obj) {
if ($obj['type'] == '') {
continue;
}
//$md2xml = new ilMD2XML($obj['obj_id'], 0, $obj['type']);
$md2xml = new ilMD2XML($this->getId(), $obj['obj_id'], $obj['type']);
$md2xml->setExportMode(true);
$md2xml->startExport();
$a_xml_writer->appendXML($md2xml->getXML());
}
$a_xml_writer->xmlEndTag("StructureObject");
}