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


PHP Field::toDoc方法代码示例

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


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

示例1: toDoc

 public function toDoc()
 {
     $temp = $this->{'joinable-sections'};
     $this->{'joinable-sections'} = array();
     $doc = parent::toDoc();
     $doc->formatOutput = true;
     $parent = $doc->xpath('/field/joinable-sections')->item(0);
     $this->{'joinable-sections'} = $temp;
     foreach ($this->{'joinable-sections'} as $section) {
         $item = $doc->createElement('item');
         $item->setValue($section);
         $parent->appendChild($item);
     }
     return $doc;
 }
开发者ID:symphonycms,项目名称:symphony-3,代码行数:15,代码来源:field.join.php

示例2: toDoc

 public function toDoc()
 {
     $suggestion_list_source = NULL;
     if (isset($this->properties->{'suggestion-list-source'}) && is_array($this->properties->{'suggestion-list-source'})) {
         $suggestion_list_source = $this->properties->{'suggestion-list-source'};
     }
     unset($this->properties->{'suggestion-list-source'});
     $include_existing = $this->{'suggestion-list-include-existing'} == true ? 'yes' : 'no';
     unset($this->properties->{'suggestion-list-include-existing'});
     $doc = parent::toDoc();
     $this->properties->{'suggestion-list-include-existing'} = $include_existing;
     $this->properties->{'suggestion-list-source'} = $suggestion_list_source;
     if (!is_null($suggestion_list_source)) {
         $element = $doc->createElement('suggestion-list-source');
         $element->setAttribute('include-existing', $include_existing);
         foreach ($suggestion_list_source as $key => $value) {
             list($section, $field) = $value;
             $item = $doc->createElement('item');
             $item->setAttributeArray(array('section' => $section, 'field' => $field));
             $element->appendChild($item);
         }
         $doc->documentElement->appendChild($element);
     }
     return $doc;
 }
开发者ID:symphonycms,项目名称:symphony-3,代码行数:25,代码来源:field.taglist.php

示例3: toDoc

 public function toDoc()
 {
     $related_fields = NULL;
     if (isset($this->properties->{'related-fields'}) && is_array($this->properties->{'related-fields'})) {
         $related_fields = $this->properties->{'related-fields'};
     }
     unset($this->properties->{'related-fields'});
     $doc = parent::toDoc();
     $this->properties->{'related-fields'} = $related_fields;
     if (!is_null($related_fields)) {
         $element = $doc->createElement('related-fields');
         foreach ($related_fields as $key => $value) {
             list($section, $field) = $value;
             $item = $doc->createElement('item');
             $item->setAttributeArray(array('section' => $section, 'field' => $field));
             $element->appendChild($item);
         }
         $doc->documentElement->appendChild($element);
     }
     return $doc;
 }
开发者ID:brendo,项目名称:symphony-3,代码行数:21,代码来源:field.link.php


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