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


PHP UploadField::Field方法代码示例

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


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

示例1: Field

 public function Field($properties = array())
 {
     Requirements::javascript(THIRDPARTY_DIR . '/jquery-ui/jquery-ui.js');
     Requirements::javascript(SORTABLEFILE_DIR . '/javascript/SortableUploadField.js');
     Requirements::css(SORTABLEFILE_DIR . '/css/SortableUploadField.css');
     return parent::Field($properties);
 }
开发者ID:vinstah,项目名称:body,代码行数:7,代码来源:SortableUploadField.php

示例2: Field

 public function Field($properties = array())
 {
     $output = parent::Field($properties);
     Requirements::javascript('ModifiedUploadField/javascript/ModifiedUploadField_downloadtemplate.js');
     Requirements::javascript('ModifiedUploadField/javascript/ModifiedUploadField.js');
     return $output;
 }
开发者ID:nathancox,项目名称:silverstripe-modifieduploadfield,代码行数:7,代码来源:ModifiedUploadField.php

示例3: Field

 public function Field($properties = array())
 {
     $items = $this->getItems();
     $unprocessed = false;
     $messages = array();
     // check that all the items have been uploaded
     foreach ($items as $vFile) {
         if ($vFile->ProcessStatus != VuforiaImage::COMPLETE_STATUS) {
             // do a status check
             $update = $this->vuforiaAPIService->checkImageStatus($vFile);
             if ($update->ProcessStatus == VuforiaImage::PROCESS_STATUS) {
                 $unprocessed = true;
             }
             if ($update->ProcessStatus == VuforiaImage::ERROR_STATUS) {
                 $messages[] = $update->Messages;
             }
         }
     }
     //
     //		if (count($messages)) {
     //			$field .= '<div class="vuforia-messages" style="padding: 3px; color: #f33">' . implode('<br/>', $messages) . '</div>';
     //		}
     //
     $field = parent::Field($properties);
     return $field;
 }
开发者ID:helpfulrobot,项目名称:silverstripe-australia-vuforia,代码行数:26,代码来源:VuforiaUploadField.php

示例4: Field

 public function Field($properties = array())
 {
     //Requirements::javascript(THIRDPARTY_DIR . '/jquery-ui/jquery-ui.js');
     Requirements::javascript(SORTABLEGALLERY_DIR . '/javascript/SortableGalleryField.js');
     Requirements::customScript("window.imageClassName = '{$this->imageClassName}'; window.parentClassName='{$this->pageClassName}'; window.relationName='{$this->relationName}'");
     Requirements::css(SORTABLEGALLERY_DIR . '/css/SortableUploadField.css');
     return parent::Field($properties);
 }
开发者ID:helpfulrobot,项目名称:xmarkclx-silverstripe-extended-sortable-gallery-field,代码行数:8,代码来源:SortableGalleryField.php

示例5: Field

 /**
  * @param array $properties
  * @return HTMLText
  */
 public function Field($properties = array())
 {
     $field = parent::Field($properties);
     Requirements::css('cloudinary/css/CloudinaryUploadField.css');
     Requirements::javascript('cloudinary/javascript/CloudinaryUploadField.js');
     $this->extend('updateFieldJs');
     return $field;
 }
开发者ID:helpfulrobot,项目名称:mademedia-silverstripe-cloudinary,代码行数:12,代码来源:CloudinaryUploadField.php

示例6: Field

 public function Field($properties = array())
 {
     $field = parent::Field($properties);
     // Extra requirements
     $base = basename(dirname(__DIR__));
     Requirements::javascript("{$base}/javascript/SelectUploadField.js");
     Requirements::css("{$base}/css/SelectUploadField.css");
     return $field;
 }
开发者ID:helpfulrobot,项目名称:silverstripe-selectupload,代码行数:9,代码来源:SelectUploadField.php

示例7: Field

 public function Field($properties = array())
 {
     // add the javascript
     $this->setConfig('sorturl', $this->Link('savesort'));
     $output = parent::Field($properties);
     Requirements::javascript(SORTABLEUPLOADFIELD_DIR . '/javascript/SortableUploadField.js');
     Requirements::css(SORTABLEUPLOADFIELD_DIR . '/css/SortableUploadField.css');
     return $output;
 }
开发者ID:nathancox,项目名称:silverstripe-sortableuploadfield,代码行数:9,代码来源:SortableUploadField.php

示例8: Field

 public function Field($properties = array())
 {
     // add the javascript
     $this->setConfig('sorturl', $this->Link('savesort'));
     $output = parent::Field($properties);
     Requirements::javascript('sortableuploadfield/javascript/SortableUploadField.js');
     Requirements::css('sortableuploadfield/css/SortableUploadField.css');
     //			$this->test();
     return $output;
 }
开发者ID:helpfulrobot,项目名称:nathancox-silverstripe-sortableuploadfield,代码行数:10,代码来源:SortableUploadField.php

示例9: Field

 public function Field($properties = array())
 {
     /** @var HTMLText $htmlText */
     $htmlText = parent::Field($properties);
     Requirements::javascript(SORTABLEFILE_DIR . '/javascript/SortableUploadField.js');
     Requirements::css(SORTABLEFILE_DIR . '/css/SortableUploadField.css');
     // check if the record (to write into) exists. If not, there's no sort action to be used in the frontend
     if ($this->getRecord() && $this->getRecord()->exists()) {
         $html = $htmlText->getValue();
         $token = $this->getForm()->getSecurityToken();
         $action = Convert::raw2att($token->addToUrl($this->getItemHandler("{id}")->Link("sort")));
         // add the sort action to the field, use {id} as a substitute for the ID
         $html .= "<input type=\"hidden\" id=\"{$this->ID()}_FileSortAction\" class=\"sortableupload-sortaction\" data-action=\"{$action}\">";
         $htmlText->setValue($html);
     }
     return $htmlText;
 }
开发者ID:miamollie,项目名称:echoAerial,代码行数:17,代码来源:SortableUploadField.php

示例10: Field

 /**
  * Return our field for display in SS template
  * @param array $properties
  * @return SS_viewable
  */
 public function Field($properties = array())
 {
     // Highjack some values in the UploadField config
     $this->ufConfig['url'] = self::getBucketUrl();
     $this->ufConfig['canAttachExisting'] = false;
     $this->ufConfig['urlFileExists'] = '';
     $this->ufConfig['overwriteWarning'] = false;
     $this->ufConfig['overwriteWarning'] = false;
     $this->ufConfig['downloadTemplateName'] = 'ss-s3uploadfield-downloadtemplate';
     // Attach a signed S3 Fileupload request
     $this->ufConfig['FormData'] = self::getFormData();
     $this->ufConfig['uploadCallbackUrl'] = $this->Link('upload');
     // Call the parent function but don't return it right away
     $return = parent::Field($properties);
     // Require some custom JS
     Requirements::javascript(S3_FILE_UPLOAD_DIR . '/js/S3UploadField_downloadtemplate.js');
     Requirements::javascript(S3_FILE_UPLOAD_DIR . '/js/S3UploadField.js');
     // We want this loaded after the default CSS rules to make sure it
     // overrides the parents
     Requirements::css(S3_FILE_UPLOAD_DIR . '/css/S3UploadField.css');
     return $return;
 }
开发者ID:firebrandhq,项目名称:s3fileupload,代码行数:27,代码来源:S3FileUploadField.php

示例11: Field

 public function Field($properties = array())
 {
     $fields = parent::Field($properties);
     //replace the download template with a new one only when access the upload field through a GridField
     $useCustomTemplate = $this->getConfig('useDMSReplaceTemplate');
     if (!empty($useCustomTemplate)) {
         Requirements::block(FRAMEWORK_DIR . '/javascript/UploadField_downloadtemplate.js');
         Requirements::javascript(DMS_DIR . '/javascript/DMSUploadField_downloadtemplate.js');
     } else {
         //in the add dialog, add the addtemplate into the set of file that load
         Requirements::javascript(DMS_DIR . '/javascript/DMSUploadField_addtemplate.js');
     }
     return $fields;
 }
开发者ID:nyeholt,项目名称:silverstripe-dms,代码行数:14,代码来源:DMSUploadField.php

示例12: Field

 /**
  * Adds a JS requirement and returns the field markup.
  * 
  * @param array $properties key value pairs of template variables
  * 
  * @return string
  * 
  * @author Sebastian Diel <sdiel@pixeltricks.de>
  * @since 26.03.2013
  */
 public function Field($properties = array())
 {
     Requirements::javascript('silvercart/admin/javascript/SilvercartFileUploadField.js');
     return parent::Field($properties);
 }
开发者ID:silvercart,项目名称:silvercart,代码行数:15,代码来源:SilvercartFileUploadField.php

示例13: Field

 public function Field($properties = array())
 {
     $res = parent::Field($properties);
     Requirements::css('themes/openstack/css/custom.uploadfield.css');
     Requirements::javascript('themes/openstack/javascript/custom.uploadfield.js');
     return $res;
 }
开发者ID:OpenStackweb,项目名称:openstack-org,代码行数:7,代码来源:CustomUploadField.php

示例14: Field

 public function Field($properties = array())
 {
     $fields = parent::Field($properties);
     // Replace the download template with a new one only when access the upload field through a GridField.
     // Needs to be enabled through setConfig('downloadTemplateName', 'ss-dmsuploadfield-downloadtemplate');
     Requirements::javascript('dms/javascript/DMSUploadField_downloadtemplate.js');
     // In the add dialog, add the addtemplate into the set of file that load.
     Requirements::javascript('dms/javascript/DMSUploadField_addtemplate.js');
     return $fields;
 }
开发者ID:benmanu,项目名称:silverstripe-dms,代码行数:10,代码来源:DMSUploadField.php

示例15: Field

 /**
  * Called by SS to output the field.
  * @param array $properties [description]
  */
 public function Field($properties = array())
 {
     // Set up the JS options, placing the map pin in the default location and with the default zoom level.
     $jsOptions = array('coords' => array($this->getDefaultValue('Latitude'), $this->getDefaultValue('Longitude')), 'map' => array('zoom' => $this->getDefaultValue('Zoom') ?: $this->getOption('map.zoom'), 'mapTypeId' => 'ROADMAP'));
     $jsOptions = array_replace_recursive($this->options, $jsOptions);
     $this->setAttribute('data-settings', Convert::array2json($jsOptions));
     $this->requireDependencies();
     return parent::Field($properties);
 }
开发者ID:zarocknz,项目名称:silverstripe-geodata-uploadfield,代码行数:13,代码来源:GeodataUploadField.php


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