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


PHP HTMLFormField::__construct方法代码示例

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


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

示例1: __construct

 /**
  * @param array $params
  */
 public function __construct($params)
 {
     parent::__construct($params);
     $this->msg = empty($params['licenses']) ? wfMessage('licenses')->inContentLanguage()->plain() : $params['licenses'];
     $this->selected = null;
     $this->makeLicenses();
 }
开发者ID:MediaWiki-stable,项目名称:1.26.1,代码行数:10,代码来源:Licenses.php

示例2: __construct

 /**
  * @param array $params
  *   In adition to the usual HTMLFormField parameters, this can take the following fields:
  *   - flatlist: If given, the options will be displayed on a single line (wrapping to following
  *     lines if necessary), rather than each one on a line of its own. This is desirable mostly
  *     for very short lists of concisely labelled options.
  */
 public function __construct($params)
 {
     parent::__construct($params);
     if (isset($params['flatlist'])) {
         $this->mClass .= ' mw-htmlform-flatlist';
     }
 }
开发者ID:paladox,项目名称:mediawiki,代码行数:14,代码来源:HTMLRadioField.php

示例3: __construct

 /**
  * Constructor
  *
  * @param $params array
  */
 public function __construct($params)
 {
     parent::__construct($params);
     $this->msg = empty($params['licenses']) ? wfMsg('licenses') : $params['licenses'];
     $this->selected = null;
     $this->makeLicenses();
 }
开发者ID:eFFemeer,项目名称:seizamcore,代码行数:12,代码来源:Licenses.php

示例4: __construct

 public function __construct($params)
 {
     parent::__construct($params);
     # Per HTML5 spec, hidden fields cannot be 'required'
     # http://www.w3.org/TR/html5/forms.html#hidden-state-%28type=hidden%29
     unset($this->mParams['required']);
 }
开发者ID:whysasse,项目名称:kmwiki,代码行数:7,代码来源:HTMLHiddenField.php

示例5: __construct

 public function __construct($params)
 {
     parent::__construct($params);
     # Per HTML5 spec, hidden fields cannot be 'required'
     # http://dev.w3.org/html5/spec/states-of-the-type-attribute.html#hidden-state
     unset($this->mParams['required']);
 }
开发者ID:Tarendai,项目名称:spring-website,代码行数:7,代码来源:HTMLHiddenField.php

示例6: __construct

 public function __construct($info)
 {
     $info['nodata'] = true;
     if (isset($info['flags'])) {
         $this->mFlags = $info['flags'];
     }
     # Generate the label from a message, if possible
     if (isset($info['buttonlabel-message'])) {
         $msgInfo = $info['buttonlabel-message'];
         if (is_array($msgInfo)) {
             $msg = array_shift($msgInfo);
         } else {
             $msg = $msgInfo;
             $msgInfo = array();
         }
         $this->buttonLabel = $this->msg($msg, $msgInfo)->parse();
     } elseif (isset($info['buttonlabel'])) {
         if ($info['buttonlabel'] === ' ') {
             // Apparently some things set &nbsp directly and in an odd format
             $this->buttonLabel = ' ';
         } else {
             $this->buttonLabel = htmlspecialchars($info['buttonlabel']);
         }
     } elseif (isset($info['buttonlabel-raw'])) {
         $this->buttonLabel = $info['buttonlabel-raw'];
     }
     parent::__construct($info);
 }
开发者ID:Kaph-Noir,项目名称:mediawiki,代码行数:28,代码来源:HTMLButtonField.php

示例7: __construct

 public function __construct($params)
 {
     $missing = array_diff(self::$requiredParams, array_keys($params));
     if ($missing) {
         throw new HTMLFormFieldRequiredOptionsException($this, $missing);
     }
     parent::__construct($params);
 }
开发者ID:claudinec,项目名称:galan-wiki,代码行数:8,代码来源:HTMLCheckMatrix.php

示例8: __construct

 public function __construct($info)
 {
     $info['nodata'] = true;
     if (isset($info['flags'])) {
         $this->mFlags = $info['flags'];
     }
     parent::__construct($info);
 }
开发者ID:KaralisWebLabs,项目名称:mediawiki,代码行数:8,代码来源:HTMLButtonField.php

示例9: __construct

 public function __construct($params)
 {
     parent::__construct($params);
     // For differentiating the type of form, mainly
     if (isset($params['prefix'])) {
         $this->prefix = $params['prefix'];
     }
 }
开发者ID:Grprashanthkumar,项目名称:ColfusionWeb,代码行数:8,代码来源:HTMLCaptchaField.php

示例10: __construct

 /**
  * @param array $params
  *   - type: HTML textfield type
  *   - size: field size in characters (defaults to 45)
  *   - placeholder/placeholder-message: set HTML placeholder attribute
  *   - spellcheck: set HTML spellcheck attribute
  *   - persistent: upon unsuccessful requests, retain the value (defaults to true, except
  *     for password fields)
  */
 public function __construct($params)
 {
     parent::__construct($params);
     if (isset($params['placeholder-message'])) {
         $this->mPlaceholder = $this->getMessage($params['placeholder-message'])->parse();
     } elseif (isset($params['placeholder'])) {
         $this->mPlaceholder = $params['placeholder'];
     }
 }
开发者ID:claudinec,项目名称:galan-wiki,代码行数:18,代码来源:HTMLTextField.php

示例11: __construct

 public function __construct($params)
 {
     parent::__construct($params);
     if (isset($this->mParams['output-as-default'])) {
         $this->outputAsDefault = (bool) $this->mParams['output-as-default'];
     }
     # Per HTML5 spec, hidden fields cannot be 'required'
     # http://www.w3.org/TR/html5/forms.html#hidden-state-%28type=hidden%29
     unset($this->mParams['required']);
 }
开发者ID:claudinec,项目名称:galan-wiki,代码行数:10,代码来源:HTMLHiddenField.php

示例12: __construct

 /**
  * @param array $params
  *   In adition to the usual HTMLFormField parameters, this can take the following fields:
  *   - dropdown: If given, the options will be displayed inside a dropdown with a text field that
  *     can be used to filter them. This is desirable mostly for very long lists of options.
  *     This only works for users with JavaScript support and falls back to the list of checkboxes.
  *   - flatlist: If given, the options will be displayed on a single line (wrapping to following
  *     lines if necessary), rather than each one on a line of its own. This is desirable mostly
  *     for very short lists of concisely labelled options.
  */
 public function __construct($params)
 {
     parent::__construct($params);
     // For backwards compatibility, also handle the old way with 'cssclass' => 'mw-chosen'
     if (isset($params['dropdown']) || strpos($this->mClass, 'mw-chosen') !== false) {
         $this->mClass .= ' mw-htmlform-dropdown';
     }
     if (isset($params['flatlist'])) {
         $this->mClass .= ' mw-htmlform-flatlist';
     }
 }
开发者ID:paladox,项目名称:mediawiki,代码行数:21,代码来源:HTMLMultiSelectField.php

示例13: __construct

 public function __construct($info)
 {
     if (isset($info['buttonclass'])) {
         $this->mButtonClass = $info['buttonclass'];
     }
     if (isset($info['buttonid'])) {
         $this->mButtonId = $info['buttonid'];
     }
     if (isset($info['buttonname'])) {
         $this->mButtonName = $info['buttonname'];
     }
     if (isset($info['buttondefault'])) {
         $this->mButtonValue = $info['buttondefault'];
     }
     if (isset($info['buttontype'])) {
         $this->mButtonType = $info['buttontype'];
     }
     parent::__construct($info);
 }
开发者ID:D66Ha,项目名称:mediawiki,代码行数:19,代码来源:HTMLFormFieldWithButton.php

示例14: __construct

 public function __construct($params)
 {
     $this->uniqueId = get_class($this) . ++self::$counter . 'x';
     parent::__construct($params);
     if (empty($this->mParams['fields']) || !is_array($this->mParams['fields'])) {
         throw new MWException('HTMLFormFieldCloner called without any fields');
     }
     // Make sure the delete button, if explicitly specified, is sane
     if (isset($this->mParams['fields']['delete'])) {
         $class = 'mw-htmlform-cloner-delete-button';
         $info = $this->mParams['fields']['delete'] + ['cssclass' => $class];
         unset($info['name'], $info['class']);
         if (!isset($info['type']) || $info['type'] !== 'submit') {
             throw new MWException('HTMLFormFieldCloner delete field, if specified, must be of type "submit"');
         }
         if (!in_array($class, explode(' ', $info['cssclass']))) {
             $info['cssclass'] .= " {$class}";
         }
         $this->mParams['fields']['delete'] = $info;
     }
 }
开发者ID:claudinec,项目名称:galan-wiki,代码行数:21,代码来源:HTMLFormFieldCloner.php

示例15: __construct

 public function __construct($info)
 {
     $info['nodata'] = true;
     if (isset($info['flags'])) {
         $this->mFlags = $info['flags'];
     }
     # Generate the label from a message, if possible
     if (isset($info['buttonlabel-message'])) {
         $this->buttonLabel = $this->getMessage($info['buttonlabel-message'])->parse();
     } elseif (isset($info['buttonlabel'])) {
         if ($info['buttonlabel'] === ' ') {
             // Apparently some things set &nbsp directly and in an odd format
             $this->buttonLabel = ' ';
         } else {
             $this->buttonLabel = htmlspecialchars($info['buttonlabel']);
         }
     } elseif (isset($info['buttonlabel-raw'])) {
         $this->buttonLabel = $info['buttonlabel-raw'];
     }
     $this->setShowEmptyLabel(false);
     parent::__construct($info);
 }
开发者ID:claudinec,项目名称:galan-wiki,代码行数:22,代码来源:HTMLButtonField.php


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