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


PHP ilXmlWriter::appendXML方法代码示例

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


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

示例1: toXML

 /**
  * Write webresource xml
  * @param ilXmlWriter $writer
  * @return 
  */
 public function toXML(ilXmlWriter $writer)
 {
     $attribs = array("obj_id" => "il_" . IL_INST_ID . "_webr_" . $this->getId());
     $writer->xmlStartTag('WebLinks', $attribs);
     // LOM MetaData
     include_once 'Services/MetaData/classes/class.ilMD2XML.php';
     $md2xml = new ilMD2XML($this->getId(), $this->getId(), 'webr');
     $md2xml->startExport();
     $writer->appendXML($md2xml->getXML());
     // Sorting
     include_once './Services/Container/classes/class.ilContainerSortingSettings.php';
     switch (ilContainerSortingSettings::_lookupSortMode($this->getId())) {
         case ilContainer::SORT_MANUAL:
             $writer->xmlElement('Sorting', array('type' => 'Manual'));
             break;
         case ilContainer::SORT_TITLE:
         default:
             $writer->xmlElement('Sorting', array('type' => 'Title'));
             break;
     }
     // All links
     include_once './Modules/WebResource/classes/class.ilLinkResourceItems.php';
     $links = new ilLinkResourceItems($this->getId());
     $links->toXML($writer);
     $writer->xmlEndTag('WebLinks');
     return true;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:32,代码来源:class.ilObjLinkResource.php

示例2: toXml

 /**
  * Write xml of template action
  * @param ilXmlWriter $writer
  */
 public function toXml(ilXmlWriter $writer)
 {
     $writer->xmlStartTag('localRoleAction');
     $il_id = 'il_' . IL_INST_ID . '_' . ilObject::_lookupType($this->getRoleTemplateId()) . '_' . $this->getRoleTemplateId();
     $writer->xmlStartTag('roleTemplate', array('id' => $il_id));
     include_once './Services/AccessControl/classes/class.ilRoleXmlExport.php';
     $exp = new ilRoleXmlExport();
     $exp->setMode(ilRoleXmlExport::MODE_DTPL);
     $exp->addRole($this->getRoleTemplateId(), ROLE_FOLDER_ID);
     $exp->write();
     $writer->appendXML($exp->xmlDumpMem(FALSE));
     $writer->xmlEndTag('roleTemplate');
     $writer->xmlEndTag('localRoleAction');
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:18,代码来源:class.ilDidacticTemplateLocalRoleAction.php


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