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


PHP FormControl::__construct方法代碼示例

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


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

示例1: __construct

 public function __construct($name, $storage = 'null:null', array $properties = array(), array $settings = array())
 {
     $this->settings['error_wrap'] = function ($output, $errors) {
         return sprintf('<ol class="_control_error_list"><li>%2$s</li></ol>', $output, implode('</li><li>', $errors));
     };
     parent::__construct($name, $storage, $properties, $settings);
 }
開發者ID:habari,項目名稱:system,代碼行數:7,代碼來源:formcontroldom.php

示例2: __construct

 public function __construct($forcedValue = NULL)
 {
     parent::__construct();
     $this->control->type = 'hidden';
     $this->value = (string) $forcedValue;
     $this->forcedValue = $forcedValue;
 }
開發者ID:bazo,項目名稱:Mokuji,代碼行數:7,代碼來源:HiddenField.php

示例3: __construct

 public function __construct($forcedValue = NULL)
 {
     parent::__construct();
     $this->control->type = 'hidden';
     $this->control->data['nette-rules'] = FALSE;
     $this->value = (string) $forcedValue;
     $this->forcedValue = $forcedValue;
 }
開發者ID:radypala,項目名稱:maga-website,代碼行數:8,代碼來源:HiddenField.php

示例4: __construct

 /**
  * @param  string  label
  * @param  int  width of the control
  * @param  int  maximum number of characters the user may enter
  */
 public function __construct($label, $format = null)
 {
     parent::__construct($label);
     if (null === $format) {
         $format = self::$defaultFormat;
     }
     $this->format = $format;
 }
開發者ID:romcok,項目名稱:DateSelect,代碼行數:13,代碼來源:DateSelect.php

示例5: __construct

 /**
  * @param  string  label
  * @param  array   items from which to choose
  * @param  int     number of rows that should be visible
  */
 public function __construct($label = NULL, array $items = NULL, $size = NULL)
 {
     parent::__construct($label);
     $this->control->setName('select');
     $this->control->size = $size > 1 ? (int) $size : NULL;
     if ($items !== NULL) {
         $this->setItems($items);
     }
 }
開發者ID:radypala,項目名稱:maga-website,代碼行數:14,代碼來源:SelectBox.php

示例6: __construct

 /**
  * @param  string  label
  * @param  array   options from which to choose
  */
 public function __construct($label = NULL, array $items = NULL)
 {
     parent::__construct($label);
     $this->control->type = 'radio';
     $this->container = Html::el();
     $this->separator = Html::el('br');
     if ($items !== NULL) {
         $this->setItems($items);
     }
 }
開發者ID:radypala,項目名稱:maga-website,代碼行數:14,代碼來源:RadioList.php

示例7: __construct

 /**
  * @param  string  label
  * @param  array   items from which to choose
  * @param  int     number of rows that should be visible
  */
 public function __construct($label = NULL, array $items = NULL, $size = NULL)
 {
     parent::__construct($label);
     $this->control->setName('select');
     $this->control->size = $size > 1 ? (int) $size : NULL;
     $this->control->onfocus = 'this.onmousewheel=function(){return false}';
     // prevents accidental change in IE
     $this->label->onclick = 'document.getElementById(this.htmlFor).focus();return false';
     // prevents deselect in IE 5 - 6
     if ($items !== NULL) {
         $this->setItems($items);
     }
 }
開發者ID:bazo,項目名稱:Mokuji,代碼行數:18,代碼來源:SelectBox.php

示例8: __construct

 public function __construct($value, $name = null)
 {
     parent::__construct($name);
     $this->value($value);
 }
開發者ID:adamwathan,項目名稱:form,代碼行數:5,代碼來源:Button.php

示例9: __construct

 /**
  * @param  string  label
  */
 public function __construct($label)
 {
     $this->monitor('Nette\\Forms\\Form');
     parent::__construct($label);
     $this->control->type = 'file';
 }
開發者ID:jakubkulhan,項目名稱:shopaholic,代碼行數:9,代碼來源:FileUpload.php

示例10: __construct

 /**
  * @param  string  caption
  */
 public function __construct($caption = NULL)
 {
     parent::__construct($caption);
     $this->control->type = 'button';
     $this->value = FALSE;
 }
開發者ID:vrana,項目名稱:nette,代碼行數:9,代碼來源:Button.php

示例11: __construct

 /**
  * @param  string  label
  */
 public function __construct($label)
 {
     parent::__construct($label);
     $this->control->type = 'checkbox';
     $this->value = FALSE;
 }
開發者ID:laiello,項目名稱:webuntucms,代碼行數:9,代碼來源:Checkbox.php

示例12: __construct

 /**
  * Called upon construct.  Sets default control properties
  */
 public function __construct($name, $storage = 'null:null', array $properties = array(), array $settings = array())
 {
     $this->properties['type'] = 'text';
     parent::__construct($name, $storage, $properties, $settings);
 }
開發者ID:habari,項目名稱:system,代碼行數:8,代碼來源:formcontroltext.php

示例13: __construct

 /**
  * @param  string  label
  */
 public function __construct($label = NULL)
 {
     parent::__construct($label);
     $this->control->type = 'file';
 }
開發者ID:riskatlas,項目名稱:micka,代碼行數:8,代碼來源:UploadControl.php

示例14: __construct

 /**
  * @param  string  label
  */
 public function __construct($label = NULL)
 {
     parent::__construct($label);
     $this->control->type = 'file';
     $this->control->data['nette-rules'] = FALSE;
 }
開發者ID:radypala,項目名稱:maga-website,代碼行數:9,代碼來源:FileUpload.php

示例15: __construct

 public function __construct($controlType, $controlId, $labelText)
 {
     parent::__construct($controlType, $controlId, $labelText);
     $this->setHidden();
 }
開發者ID:eguicciardi,項目名稱:ada,代碼行數:5,代碼來源:FormControl.inc.php


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