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


PHP Field::displayPublishPanel方法代码示例

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


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

示例1: __wrapFieldWithDiv

 private function __wrapFieldWithDiv(Field $field, Entry $entry = NULL)
 {
     $div = $this->createElement('div', NULL, array('class' => sprintf('field field-%s %s %s', $field->handle(), $field->required == 'yes' ? 'required' : '', $this->__calculateWidth($field->width))));
     $field->displayPublishPanel($div, !is_null($entry) ? $entry->getData($field->id) : NULL, isset($this->_errors[$field->id]) ? $this->_errors[$field->id] : NULL, null, null, !is_null($entry) && is_numeric($entry->get('id')) ? $entry->get('id') : NULL);
     return $div;
 }
开发者ID:pointybeard,项目名称:symphony-3,代码行数:6,代码来源:content.publish.php

示例2: __wrapFieldWithDiv

 /**
  * Given a Field and Entry object, this function will wrap
  * the Field's displayPublishPanel result with a div that
  * contains some contextual information such as the Field ID,
  * the Field handle and whether it is required or not.
  *
  * @param Field $field
  * @param Entry $entry
  * @return XMLElement
  */
 private function __wrapFieldWithDiv(Field $field, Entry $entry)
 {
     $div = new XMLElement('div', NULL, array('id' => 'field-' . $field->get('id'), 'class' => 'field field-' . $field->handle() . ($field->get('required') == 'yes' ? ' required' : '')));
     $field->displayPublishPanel($div, $entry->getData($field->get('id')), isset($this->_errors[$field->get('id')]) ? $this->_errors[$field->get('id')] : NULL, null, null, is_numeric($entry->get('id')) ? $entry->get('id') : NULL);
     return $div;
 }
开发者ID:nickdunn,项目名称:elasticsearch-surfin-shakespeare,代码行数:16,代码来源:content.publish.php

示例3: __wrapFieldWithDiv

 private function __wrapFieldWithDiv(Field $field, Entry $entry, $prefix = null, $postfix = null, $css = null)
 {
     $div = new XMLElement('div', NULL, array('class' => 'field field-' . $field->handle() . ($field->get('required') == 'yes' ? ' required' : '')));
     if ($css != null) {
         $div->setAttribute('style', $css);
     }
     $field->displayPublishPanel($div, $_POST['fields'][$field->get('element_name')], isset($this->_errors[$field->get('id')]) ? $this->_errors[$field->get('id')] : NULL, $prefix ? '[' . $prefix . ']' : null, null, is_numeric($entry->get('id')) ? $entry->get('id') : NULL);
     return $div;
 }
开发者ID:bauhouse,项目名称:sym-extensions,代码行数:9,代码来源:content.inject.php


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