當前位置: 首頁>>代碼示例>>PHP>>正文


PHP HiddenField::__construct方法代碼示例

本文整理匯總了PHP中HiddenField::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP HiddenField::__construct方法的具體用法?PHP HiddenField::__construct怎麽用?PHP HiddenField::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在HiddenField的用法示例。


在下文中一共展示了HiddenField::__construct方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 public function __construct($name, $title = "", $value = "", $width = 1140, $height = 600, $baseImages = null)
 {
     $this->width = $width;
     $this->height = $height;
     $this->baseImages = $baseImages;
     parent::__construct($name, $title, $value);
 }
開發者ID:helpfulrobot,項目名稱:nimeso-silverstripe-drawpolygonfield,代碼行數:7,代碼來源:DrawPolygonField.php

示例2: __construct

 /**
  *
  * @param GridField $name
  * @param string $data - json encoded string
  */
 public function __construct($grid, $value = null)
 {
     $this->grid = $grid;
     if ($value) {
         $this->setValue($value);
     }
     parent::__construct($grid->getName() . '[GridState]');
 }
開發者ID:prostart,項目名稱:cobblestonepath,代碼行數:13,代碼來源:GridState.php

示例3: __construct

 public function __construct($name, $title = null, $value = "", $form = null)
 {
     // naming with underscores to prevent values from actually being saved somewhere
     $this->fieldLatitude = new HiddenField("{$name}[Latitude]", null);
     $this->fieldLongditude = new HiddenField("{$name}[Longditude]", null);
     $this->fieldPositionSet = new HiddenField("{$name}[PositionSet]", null);
     $this->fieldPositionSet->setValue(0);
     parent::__construct($name, $title, null, $form);
     $this->setValue($value);
 }
開發者ID:helpfulrobot,項目名稱:andrelohmann-silverstripe-geoform,代碼行數:10,代碼來源:HiddenLocationField.php

示例4: __construct

 public function __construct($name, $title = null, $value = null, $mapping = [], $identifier = null)
 {
     if ($value && $value instanceof \DataObjectInterface) {
         $this->recordClass = get_class($value);
     } elseif (\ClassInfo::exists($name) && singleton($name) instanceof \DataObjectInterface) {
         $this->recordClass = $name;
     }
     $this->mapping = $mapping;
     $this->identifier = $identifier;
     $this->doNotMapTo();
     parent::__construct($name, $title);
 }
開發者ID:helpfulrobot,項目名稱:milkyway-multimedia-ss-mwm-formfields,代碼行數:12,代碼來源:RecordMapField.php

示例5:

 /**
  * Returns an input field, class="text" and type="text" with an optional maxlength
  */
 function __construct($name, $title = null, $flickrPhoto = '', $maxLength = null, $form = null)
 {
     $this->maxLength = $maxLength;
     parent::setTemplate('FLickrPhotoSelectionField');
     $value = '';
     if ($flickrPhoto) {
         $value = $flickrPhoto->ID;
         $this->flickrTitle = $flickrPhoto->Title;
         $this->flickrID = $flickrPhoto->FlickrID;
         $this->mediumURL = $flickrPhoto->MediumURL;
     }
     $this->addExtraClass('flickrPhotoSelectionField');
     parent::__construct($name, $title, $value, $form);
 }
開發者ID:gordonbanderson,項目名稱:flickr-editor,代碼行數:17,代碼來源:FlickrPhotoSelectionField.php

示例6:

 function __construct($name, $title = null, $value = '')
 {
     parent::__construct($name, $title, $value);
 }
開發者ID:helpfulrobot,項目名稱:mrmorphic-neolayout,代碼行數:4,代碼來源:NLCMSLayoutEditorField.php

示例7: __construct

 public function __construct($name, $title, $className = "SiteTree", $label = "Title", $val = null, $form = null)
 {
     parent::__construct($name, $title, $val, $form);
     $this->labelField = $label;
     $this->sourceClass = $className;
 }
開發者ID:nicmart,項目名稱:comperio-site,代碼行數:6,代碼來源:LiveDropdownField.php

示例8:

 /**
  * Creates a new optionset field for order modifers with the naming convention
  * Modifiers[ClassName] where ClassName is name of modifier class.
  * 
  * @param name The field name, needs to be the class name of the class that is going to be the modifier
  * @param title The field title
  * @param source An map of the dropdown items
  * @param value The current value
  * @param form The parent form
  */
 function __construct($modifier, $title = null, $value = "", $maxLength = null, $form = null)
 {
     $name = "Modifiers[{$modifier->ClassName}]";
     $this->modifier = $modifier;
     parent::__construct($name, $title, $value, $maxLength, $form);
 }
開發者ID:helpfulrobot,項目名稱:swipestripe-swipestripe,代碼行數:16,代碼來源:ModifierHiddenField.php

示例9:

 /**
  * Creates a new optionset field for order modifers with the naming convention
  * Modifiers[ClassName] where ClassName is name of modifier class.
  * 
  * @param name The field name, needs to be the class name of the class that is going to be the modifier
  * @param title The field title
  * @param source An map of the dropdown items
  * @param value The current value
  * @param form The parent form
  */
 function __construct($modifier, $title = null, $value = "", $maxLength = null, $form = null)
 {
     $name = "Modifiers[" . get_class($modifier) . "]";
     $this->modifier = $modifier;
     parent::__construct($name, $title, $value, $maxLength, $form);
 }
開發者ID:vinstah,項目名稱:body,代碼行數:16,代碼來源:ModificationField.php


注:本文中的HiddenField::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。