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


PHP HeaderField::Field方法代码示例

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


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

示例1: UploadForm

 public function UploadForm()
 {
     // Sync up the DB
     //		singleton('Folder')->syncChildren();
     $className = $this->sourceClass();
     $childData = new $className();
     $validator = $this->getValidatorFor($childData);
     if ($this->Can('upload')) {
         SWFUploadConfig::addPostParams(array('dataObjectClassName' => $this->sourceClass(), 'dataObjectFieldName' => $this->dataObjectFieldName, 'fileFieldName' => $this->fileFieldName, 'fileClassName' => $this->fileClassName, 'parentIDName' => $this->getParentIdName($this->getParentClass(), $this->sourceClass()), 'controllerID' => $this->controllerID, 'OverrideUploadFolder' => $this->getUploadFolder(), 'hasDataObject' => $this->hasDataObject ? 1 : 0));
         if ($this->allowUploadFolderSelection) {
             SWFUploadConfig::addDynamicPostParam('UploadFolder', 'FileDataObjectManager_Popup_UploadForm_UploadFolder');
         }
         if ($this->getAllowedFileTypes()) {
             SWFUploadConfig::addFileTypes($this->getAllowedFileTypes());
         }
         if ($this->enableUploadDebugging) {
             SWFUploadConfig::set_var('debug', 'true');
         }
     }
     $fields = $this->Can('upload') ? $this->getUploadFields() : new FieldSet(new HeaderField($title = sprintf(_t('DataObjectManager.ADD', 'Add %s'), $this->PluralTitle()), $headingLevel = 2));
     $form = Object::create($this->popupClass, $this, 'UploadForm', $fields, $validator, false, $childData);
     $action = $this->Can('upload') ? new FieldSet(new FormAction('saveUploadForm', 'Upload')) : new FieldSet();
     $form->setActions($action);
     if ($this->Can('import')) {
         $header = new HeaderField($title = _t('DataObjectManager.IMPORTFROMFOLDER', 'Import from an existing folder'), $headingLevel = 3);
         $holder = new LiteralField("holder", "<div class='ajax-loader'></div><div id='import-holder'></div>");
         if (!isset($_POST['uploaded_files'])) {
             return $form->forTemplate() . $header->Field() . $this->ImportDropdown()->Field() . $holder->Field();
         } else {
             return $form;
         }
     }
     return $form;
 }
开发者ID:racontemoi,项目名称:shibuichi,代码行数:34,代码来源:FileDataObjectManager.php


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