當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。