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


PHP FormElement::__construct方法代码示例

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


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

示例1: __construct

 /**
  * Constructor.
  *
  * @param string $name
  */
 public function __construct($name, $value = 0)
 {
     parent::__construct($name);
     $this->count = MATCHMAKING_BOL_Service::MAX_COEFFICIENT;
     $this->setValue($value);
     $this->addValidator(new CoefficientValidator());
 }
开发者ID:hardikamutech,项目名称:loov,代码行数:12,代码来源:coefficient.php

示例2: __construct

	public function  __construct($atts = null) {
		parent::__construct($atts);

		// Some defaults
		$this->_attributes['class'] = 'formelement formcheckboxinput';
		$this->_validattributes     = array('accesskey', 'checked', 'dir', 'disabled', 'id', 'lang', 'name', 'required', 'tabindex', 'style', 'value');
	}
开发者ID:nicholasryan,项目名称:CorePlus,代码行数:7,代码来源:FormCheckboxInput.class.php

示例3: __construct

	public function  __construct($atts = null) {
		parent::__construct($atts);

		// Some defaults
		$this->_attributes['class'] = 'formelement formtextareainput';
		$this->_validattributes     = array('accesskey', 'dir', 'disabled', 'id', 'lang', 'name', 'placeholder', 'readonly', 'required', 'tabindex', 'rows', 'cols', 'style', 'class');
	}
开发者ID:nicholasryan,项目名称:CorePlus,代码行数:7,代码来源:FormTextareaInput.class.php

示例4: __construct

 public function __construct($atts = null)
 {
     // Some defaults
     $this->_attributes = array('class' => 'formelement multifileinput', 'previewdimensions' => '200x100', 'browsable' => false, 'basedir' => '');
     $this->_validattributes = array();
     $this->requiresupload = true;
     parent::__construct($atts);
 }
开发者ID:nicholasryan,项目名称:CorePlus,代码行数:8,代码来源:MultiFileInput.class.php

示例5: __construct

 public function __construct($name)
 {
     parent::__construct($name);
     $tagFieldName = 'input_' . $this->getName() . '_tag_field';
     $this->tag = new TagsInputField($tagFieldName);
     $this->tag->setMinChars(1);
     $this->value = array();
 }
开发者ID:ZyXelP,项目名称:oxwall,代码行数:8,代码来源:form_fields.php

示例6: __construct

 public function __construct($atts = null)
 {
     parent::__construct($atts);
     // Some defaults
     $this->_attributes['class'] = 'formelement formwysiwyginput tinymce';
     $this->_attributes['rows'] = '25';
     // Note, I'm taking the required flag out from here; tinymce doesn't support it.
     $this->_validattributes = array('accesskey', 'dir', 'disabled', 'id', 'lang', 'name', 'readonly', 'tabindex', 'rows', 'cols', 'style', 'class');
 }
开发者ID:nicholasryan,项目名称:CorePlus,代码行数:9,代码来源:TinyMCEFormElement.class.php

示例7: __construct

 public function __construct($atts = null)
 {
     parent::__construct($atts);
     // Some defaults
     $this->_attributes['class'] = 'formelement formcaptchainput';
     if (!$this->get('name')) {
         $this->set('name', 'captcha');
     }
     $this->_validattributes = array('id', 'name', 'required', 'tabindex', 'style');
 }
开发者ID:nicholasryan,项目名称:CorePlus,代码行数:10,代码来源:FormCaptchaInput.class.php

示例8: __construct

 /**
  * Constructor.
  *
  * @param string $name
  */
 public function __construct($name, $invitation = null, $context = MCOMPOSE_BOL_Service::CONTEXT_USER)
 {
     parent::__construct($name);
     if (!empty($invitation)) {
         $this->setInvitation($invitation);
     }
     $this->context = $context;
     $this->addClass('mc-user-select');
     $this->addClass('jhtmlarea');
     $this->service = MCOMPOSE_BOL_Service::getInstance();
 }
开发者ID:vazahat,项目名称:dudex,代码行数:16,代码来源:user_select_field.php

示例9: __construct

 public function __construct($atts = null)
 {
     $defaults = ['class' => 'formelement geoaddressforminput', 'use_label' => true];
     parent::__construct($atts);
     // Some defaults
     foreach ($defaults as $k => $v) {
         if (!isset($this->_attributes[$k])) {
             $this->_attributes[$k] = $v;
         }
     }
 }
开发者ID:nicholasryan,项目名称:CorePlus,代码行数:11,代码来源:GeoAddressFormInput.php

示例10: __construct

	public function  __construct($atts = null) {
		parent::__construct($atts);

		// Some defaults
		$defaults = [
			'class' => 'formelement formbuttoninput',
		];
		foreach($defaults as $k => $v){
			if(!isset($this->_attributes[$k])){
				$this->_attributes[$k] = $v;
			}
		}

		$this->_validattributes     = array('accesskey', 'dir', 'disabled', 'id', 'lang', 'name', 'size', 'tabindex', 'width', 'height', 'value', 'style');
	}
开发者ID:nicholasryan,项目名称:CorePlus,代码行数:15,代码来源:FormButtonInput.class.php

示例11: __construct

	public function __construct($atts = null){
		parent::__construct($atts);

		// Some defaults
		$defaults = [
			'class' => 'formelement formuserinput',
		];
		foreach($defaults as $k => $v){
			if(!isset($this->_attributes[$k])){
				$this->_attributes[$k] = $v;
			}
		}

		$this->_validattributes = array(
			'accesskey', 'autocomplete', 'dir', 'disabled',
			'lang', 'maxlength', 'placeholder',
			'required', 'size', 'tabindex', 'width', 'height',
			'style'
		);
	}
开发者ID:nicholasryan,项目名称:CorePlus,代码行数:20,代码来源:FormUserInput.php

示例12: foreach

 /**
  * Constructor
  *
  * @param string $name
  * @param string $selectedValue 
  * @param Option $optionsTags 
  * @param string or array $options 
  * @author Justin Palmer
  */
 function __construct($name, $selectedValue, $optionTags, $options = null)
 {
     $args = func_get_args();
     $name = array_shift($args);
     $selectedValue = array_shift($args);
     $options = array_pop($args);
     $options = $this->preparePrompt($options);
     if ($args[0] !== null) {
         foreach ($args as $option) {
             if (!$option instanceof Option) {
                 throw new Exception("Invalid tag for element 'Select'.  Only 'Option' elements may be passed.");
             }
             if ($option->value === $selectedValue) {
                 $option->selected = true;
             }
             $this->display .= $option . "\n";
         }
     }
     parent::__construct($name, '', $options);
 }
开发者ID:ToddBudde,项目名称:phrails,代码行数:29,代码来源:Select.php

示例13: __construct

	public function  __construct($atts = null) {
		parent::__construct($atts);

		// Some defaults
		$this->_attributes['class'] = 'formelement formtextinput';
		$this->_validattributes     = [
			'accesskey', 'autocomplete',
			'dir', 'disabled',
			'height',
			'id',
			'lang',
			'maxlength',
			'name',
			'placeholder',
			'readonly',
			'required',
			'size',
			'style',
			'tabindex',
			'value',
			'width',
		];
	}
开发者ID:nicholasryan,项目名称:CorePlus,代码行数:23,代码来源:FormTextInput.class.php

示例14: __construct

 /**
  * Constructor
  *
  * @param	string	$name			Database column name
  * @param	string	$label			Label content
  * @param	array	$options		Array containing values available for selection
  */
 public function __construct($name, $label, $options = array())
 {
     parent::__construct($name);
     $this->setLabel($label);
     $this->setOptions($options);
 }
开发者ID:aselvan,项目名称:PHPKnock,代码行数:13,代码来源:dropdown_class.php

示例15:

 function __construct($initial_value = '', $name = null)
 {
     parent::__construct('select', $initial_value, $name, true);
 }
开发者ID:RNKushwaha022,项目名称:orange-php,代码行数:4,代码来源:inputdropdown.class.php


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