__construct() public method

public __construct ( $selectStatement = null )
Beispiel #1
0
 function __construct($parent, $id, $args = array())
 {
     $this->special_args('label-class', $args);
     $this->label_class = trim('checkbox ' . $this->label_class);
     $this->has_multiple_values = true;
     parent::__construct($parent, $id, $args);
 }
 /**
  * Constructor
  *
  * @param string  $caption caption
  * @param string  $name    name
  * @param mixed   $value   Pre-selected value (or array of them).
  * @param integer $size    Number of rows. "1" makes a drop-down-list
  */
 public function __construct($caption, $name, $value = null, $size = 1)
 {
     parent::__construct($caption, $name, $value, $size, false);
     $this->addOption(XOOPS_MATCH_START, \XoopsLocale::STARTS_WITH);
     $this->addOption(XOOPS_MATCH_END, \XoopsLocale::ENDS_WITH);
     $this->addOption(XOOPS_MATCH_EQUAL, \XoopsLocale::MATCHES);
     $this->addOption(XOOPS_MATCH_CONTAIN, \XoopsLocale::CONTAINS);
 }
Beispiel #3
0
 /**
  * Constructor
  *
  * @param string $name
  * @param string $selectedValue 
  * @param Option $optionsTags 
  * @param string or array $options 
  * @author Justin Palmer
  */
 function __construct($name, array $array, $selectedValue = null, $options = null)
 {
     $options = $this->preparePrompt($options);
     foreach ($array as $option) {
         $this->display .= $option;
     }
     parent::__construct($name, $selectedValue, null, $options);
 }
Beispiel #4
0
 public function __construct($attributes)
 {
     parent::__construct($attributes);
     $this->_jsFunction = 'LoadProducts_' . $this->_id;
     $this->attributes['jsfunction'] = 'xajax_' . $this->_jsFunction;
     App::getRegistry()->xajax->registerFunction(array($this->_jsFunction, $this, 'loadProducts'));
     $this->attributes['load_categorychildren'] = App::getRegistry()->xajaxInterface->registerFunction(array('LoadCategoryChildren_' . $this->_id, $this, 'loadCategoryChildren'));
     $this->attributes['datagrid_filter'] = $this->getDatagridfilterData();
 }
 public function __construct($sLabel, $sName, array $aProperties = null)
 {
     $aOptions = array();
     $aKeys = ['-12', '-11', '-10', '-9', '-8', '-7', '-6', '-5', '-4', '-3.5', '-3', '-2', '-1', '+0', '+1', '+2', '+3', '+3.5', '+4', '+4.5', '+5', '+5.5', '+6', '+7', '+8', '+8.75', '+9', '+9.5', '+10', '+10.5', '+11', '+11.5', '+12', '+12.75', '+13', '+14'];
     foreach ($aKeys as $sValue) {
         $aOptions[$sValue] = t($sValue);
     }
     parent::__construct($sLabel, $sName, $aOptions, $aProperties);
 }
 public function __construct($sLabel, $sName, array $aProperties = null)
 {
     $aOptions = array();
     $aKeys = ['', 'AF', 'AL', 'DZ', 'AS', 'AD', 'AO', 'AI', 'AQ', 'AG', 'AR', 'AM', 'AW', 'AU', 'AT', 'AX', 'AZ', 'BS', 'BH', 'BD', 'BB', 'BY', 'BE', 'BZ', 'BJ', 'BM', 'BT', 'BO', 'BA', 'BW', 'BV', 'BR', 'IO', 'BN', 'BG', 'BF', 'BI', 'KH', 'CM', 'CA', 'CV', 'KY', 'CF', 'TD', 'CL', 'CN', 'CX', 'CC', 'CO', 'KM', 'CG', 'CK', 'CR', 'CI', 'HR', 'CU', 'CY', 'CZ', 'CD', 'DK', 'DJ', 'DM', 'DO', 'TP', 'EC', 'EG', 'SV', 'GQ', 'ER', 'EE', 'ET', 'FK', 'FO', 'FJ', 'FI', 'FR', 'FX', 'GF', 'PF', 'TF', 'GA', 'GM', 'GE', 'DE', 'GH', 'GI', 'GR', 'GL', 'GD', 'GP', 'GU', 'GT', 'GN', 'GW', 'GY', 'HT', 'HM', 'HN', 'HK', 'HU', 'IS', 'IN', 'ID', 'IR', 'IQ', 'IE', 'IL', 'IT', 'JM', 'JP', 'JO', 'KZ', 'KE', 'KI', 'KW', 'KG', 'LA', 'LV', 'LB', 'LS', 'LR', 'LY', 'LI', 'LT', 'LU', 'MO', 'MK', 'MG', 'MW', 'MY', 'MV', 'ML', 'MT', 'MH', 'MQ', 'MR', 'MU', 'YT', 'MX', 'FM', 'MD', 'MC', 'MN', 'MS', 'MA', 'MZ', 'MM', 'NA', 'NR', 'NP', 'NL', 'AN', 'NC', 'NZ', 'NI', 'NE', 'NG', 'NU', 'NF', 'KP', 'MP', 'NO', 'OM', 'PK', 'PW', 'PA', 'PG', 'PY', 'PE', 'PH', 'PN', 'PL', 'PT', 'PR', 'QA', 'RE', 'RO', 'RU', 'RW', 'SH', 'KN', 'LC', 'PM', 'VC', 'SM', 'ST', 'SA', 'SN', 'SC', 'SL', 'SG', 'SK', 'SI', 'SB', 'SO', 'ZA', 'GS', 'KR', 'ES', 'LK', 'SD', 'SR', 'SJ', 'SZ', 'SE', 'CH', 'SY', 'TW', 'TJ', 'TZ', 'TH', 'TG', 'TK', 'TO', 'TT', 'TN', 'TR', 'TM', 'TC', 'TV', 'UG', 'UA', 'AE', 'UK', 'US', 'UM', 'UY', 'UZ', 'VU', 'VA', 'VE', 'VN', 'VG', 'VI', 'WF', 'EH', 'WS', 'YE', 'YU', 'ZM', 'ZW'];
     foreach ($aKeys as $sValue) {
         $aOptions[$sValue] = t($sValue);
     }
     parent::__construct($sLabel, $sName, $aOptions, $aProperties);
 }
Beispiel #7
0
 public function __construct($attributes)
 {
     parent::__construct($attributes);
     $this->_jsFunction = 'LoadClients_' . $this->_id;
     $this->_jsFunctionDetails = 'LoadClientData_' . $this->_id;
     $this->attributes['jsfunction'] = 'xajax_' . $this->_jsFunction;
     $this->attributes['jsfunctiondetails'] = 'xajax_' . $this->_jsFunctionDetails;
     App::getRegistry()->xajax->registerFunction(array($this->_jsFunction, $this, 'loadClients'));
     App::getRegistry()->xajaxInterface->registerFunction(array($this->_jsFunctionDetails, $this, 'loadClientDetails'));
 }
Beispiel #8
0
 /**
  * Constructor
  *
  * @param string|array $caption Caption or array of all attributes
  * @param string       $name    name
  * @param mixed        $value   Pre-selected value (or array of them).
  *                               Must be \DateTimeZone supported timezone names, or a DateTimeZone object
  * @param integer      $size    Number of rows. "1" makes a drop-down-box.
  */
 public function __construct($caption, $name, $value = null, $size = 1)
 {
     if (is_array($caption)) {
         parent::__construct($caption);
     } else {
         parent::__construct($caption, $name, $value, $size);
     }
     if (is_a($this->get('value'), '\\DateTimeZone')) {
         $this->set('value', $this->get('value')->getName());
     }
     \Xoops\Core\Lists\TimeZone::setOptionsArray($this);
 }
Beispiel #9
0
 /**
  * Constructor
  *
  * @param string|array $caption Caption or array of all attributes
  * @param string       $name    "name" attribute
  * @param mixed        $value   Pre-selected value (or array of them).
  *                               Legal are all 2-letter country codes (in capitals).
  * @param int          $size    Number or rows. "1" makes a drop-down-list
  */
 public function __construct($caption, $name = null, $value = null, $size = 1)
 {
     if (is_array($caption)) {
         parent::__construct($caption);
         $this->setIfNotSet('size', 1);
     } else {
         parent::__construct($caption, $name, $value, $size);
         $this->setWithDefaults('caption', $caption, '');
         $this->setWithDefaults('name', $name, 'name_error');
         $this->set('value', $value);
         $this->setWithDefaults('size', $size, 1);
     }
     \Xoops\Core\Lists\Country::setOptionsArray($this);
 }
Beispiel #10
0
 public function __construct($attributes)
 {
     parent::__construct($attributes);
     $this->_jsFunction = 'LoadProducts_' . $this->_id;
     $this->attributes['jsfunction'] = 'xajax_' . $this->_jsFunction;
     App::getRegistry()->xajax->registerFunction(array($this->_jsFunction, $this, 'loadProducts_' . $this->_id));
     $this->attributes['load_categorychildren'] = App::getRegistry()->xajaxInterface->registerFunction(array('LoadCategoryChildren_' . $this->_id, $this, 'loadCategoryChildren'));
     if (isset($this->attributes['exclude_from'])) {
         $this->attributes['exclude_from_field'] = $this->attributes['exclude_from']->getName();
     }
     if (!isset($this->attributes['exclude'])) {
         $this->attributes['exclude'] = array(0);
     }
     $this->attributes['datagrid_filter'] = $this->getDatagridfilterData();
 }
 public function __construct($attributes)
 {
     parent::__construct($attributes);
     if (!isset($this->attributes['key'])) {
         throw new Exception("Datagrid key (attribute: key) not set for field '{$this->attributes['name']}'.");
     }
     if (!isset($this->attributes['columns'])) {
         throw new Exception("Datagrid columns (attribute: columns) not set for field '{$this->attributes['name']}'.");
     }
     if (!isset($this->attributes['datagrid_init_function']) || !is_callable($this->attributes['datagrid_init_function'])) {
         throw new Exception("Datagrid initialization function not set (attribute: datagrid_init_function) for field '{$this->attributes['name']}'. Hint: check whether the method you have specified is public.");
     }
     $this->_jsFunction = 'LoadRecords_' . $this->_id;
     $this->attributes['jsfunction'] = 'xajax_' . $this->_jsFunction;
     App::getRegistry()->xajax->registerFunction(array($this->_jsFunction, $this, 'loadRecords_' . $this->_id));
 }
Beispiel #12
0
 /**
  * Constructor
  *
  * @param string $name
  * @param string $selectedValue 
  * @param Option $optionsTags 
  * @param string or array $options 
  * @author Justin Palmer
  */
 function __construct($name, ResultSet $resultSet, $selectedValue = null, $options = null, $optionDisplay = 'name', $id = 'id')
 {
     $this->optionDisplay = $optionDisplay;
     $this->id = $id;
     $options = $this->preparePrompt($options);
     //$resultSet->rewind();
     foreach ($resultSet as $record) {
         //var_dump($record);
         $optionDisplay = $this->optionDisplay;
         $id = $this->id;
         $select = false;
         if ($record->{$id} === $selectedValue) {
             $select = true;
         }
         $this->display .= new Option($record->{$optionDisplay}, $record->{$id}, $select) . "\n";
     }
     parent::__construct($name, $selectedValue, null, $options);
 }
Beispiel #13
0
 /**
  * Construct
  * @param string $default
  * @param array $options [optional]
  */
 public function __construct($default, $options = array())
 {
     $options = array_merge(array('folder' => '', 'extensions' => array()), $options);
     parent::__construct($default, $options);
 }
Beispiel #14
0
 public function __construct($identifier, $label, $tax = array('post_tag'), $multiple = true, array $extra_args = array(), $default = "")
 {
     parent::__construct($identifier, $label, array(), $multiple, $default);
     $this->tax = $tax;
     $this->extra_args = $extra_args;
 }
Beispiel #15
0
 public function __construct($label, $name, array $properties = null)
 {
     $options = array("" => "--Select State--", "AL" => "Alabama", "AK" => "Alaska", "AZ" => "Arizona", "AR" => "Arkansas", "CA" => "California", "CO" => "Colorado", "CT" => "Connecticut", "DE" => "Delaware", "DC" => "District of Columbia", "FL" => "Florida", "GA" => "Georgia", "HI" => "Hawaii", "ID" => "Idaho", "IL" => "Illinois", "IN" => "Indiana", "IA" => "Iowa", "KS" => "Kansas", "KY" => "Kentucky", "LA" => "Louisiana", "ME" => "Maine", "MD" => "Maryland", "MA" => "Massachusetts", "MI" => "Michigan", "MN" => "Minnesota", "MS" => "Mississippi", "MO" => "Missouri", "MT" => "Montana", "NE" => "Nebraska", "NV" => "Nevada", "NH" => "New Hampshire", "NJ" => "New Jersey", "NM" => "New Mexico", "NY" => "New York", "NC" => "North Carolina", "ND" => "North Dakota", "OH" => "Ohio", "OK" => "Oklahoma", "OR" => "Oregon", "PA" => "Pennsylvania", "RI" => "Rhode Island", "SC" => "South Carolina", "SD" => "South Dakota", "TN" => "Tennessee", "TX" => "Texas", "UT" => "Utah", "VT" => "Vermont", "VA" => "Virginia", "WA" => "Washington", "WV" => "West Virginia", "WI" => "Wisconsin", "WY" => "Wyoming");
     parent::__construct($label, $name, $options, $properties);
 }
Beispiel #16
0
 /**
  * Construct
  * @param string $default
  * @param array $options [optional]
  */
 public function __construct($default, $options = array())
 {
     $options = array_merge(array('table' => '', 'column' => ''), $options);
     parent::__construct($default, $options);
 }
Beispiel #17
0
 function __construct($name)
 {
     parent::__construct($name);
     $this->set_attr("name", "{$this->name}[]");
 }
Beispiel #18
0
 /**
  * Class constructor.
  *
  * For an overview of the supported arguments, please read the Field Types Reference.
  *
  * @since 0.5.0
  * @param string $type the field type
  * @param array $args array of field type arguments
  */
 public function __construct($type, $args)
 {
     parent::__construct($type, $args);
     $this->args['multiple'] = true;
 }
Beispiel #19
0
 /**
  * @inherit
  *
  * @param array $args
  */
 public function __construct(array $args = [])
 {
     $this->add_attributes(['multiple' => 'multiple']);
     $this->add_reserved_attribute('multiple');
     parent::__construct($args);
 }
Beispiel #20
0
 function __construct($parent, $id, $args = array())
 {
     $this->special_args('label-class', $args);
     $this->label_class = trim('radio ' . $this->label_class);
     parent::__construct($parent, $id, $args);
 }
Beispiel #21
0
 /**
  * Constructor
  *
  * @param mixed   $caption Caption or array of all attributes
  * @param string  $name    name
  * @param mixed   $value   Pre-selected value (or array of them). Valid value is
  *                         any name of a XOOPS_ROOT_PATH."/locale/" subdirectory.
  * @param integer $size    Number of rows. "1" makes a drop-down-list.
  */
 public function __construct($caption, $name = null, $value = null, $size = 1)
 {
     parent::__construct($caption, $name, $value, $size);
     \Xoops\Core\Lists\Locale::setOptionsArray($this);
     $this->setClass('span4');
 }
Beispiel #22
0
 public function __construct($control_name)
 {
     parent::__construct($control_name);
     //set up drop-down options for GWF fonts
     $this->setOptions(\Kirki_Fonts::get_font_choices());
 }
Beispiel #23
0
	public function __construct($label = false, $validators = array()) {
		parent::__construct($label, $validators);
	}
Beispiel #24
0
 public function __construct($label, $name, array $properties = null)
 {
     $options = array("" => "--Select Country--", "US" => "United States", "AF" => "Afghanistan", "AX" => "Aland Islands", "AL" => "Albania", "DZ" => "Algeria", "AS" => "American Samoa", "AD" => "Andorra", "AO" => "Angola", "AI" => "Anguilla", "AQ" => "Antarctica", "AG" => "Antigua and Barbuda", "AR" => "Argentina", "AM" => "Armenia", "AW" => "Aruba", "AU" => "Australia", "AT" => "Austria", "AZ" => "Azerbaijan", "BS" => "Bahamas, The", "BH" => "Bahrain", "BD" => "Bangladesh", "BB" => "Barbados", "BY" => "Belarus", "BE" => "Belgium", "BZ" => "Belize", "BJ" => "Benin", "BM" => "Bermuda", "BT" => "Bhutan", "BO" => "Bolivia", "BA" => "Bosnia and Herzegovina", "BW" => "Botswana", "BV" => "Bouvet Island", "BR" => "Brazil", "IO" => "British Indian Ocean Territory", "BN" => "Brunei Darussalam", "BG" => "Bulgaria", "BF" => "Burkina Faso", "BI" => "Burundi", "KH" => "Cambodia", "CM" => "Cameroon", "CA" => "Canada", "CV" => "Cape Verde", "KY" => "Cayman Islands", "CF" => "Central African Republic", "TD" => "Chad", "CL" => "Chile", "CN" => "China", "CX" => "Christmas Island", "CC" => "Cocos (Keeling) Islands", "CO" => "Colombia", "KM" => "Comoros", "CG" => "Congo", "CD" => "Congo, The Democratic Republic Of The", "CK" => "Cook Islands", "CR" => "Costa Rica", "CI" => "Cote D'ivoire", "HR" => "Croatia", "CY" => "Cyprus", "CZ" => "Czech Republic", "DK" => "Denmark", "DJ" => "Djibouti", "DM" => "Dominica", "DO" => "Dominican Republic", "EC" => "Ecuador", "EG" => "Egypt", "SV" => "El Salvador", "GQ" => "Equatorial Guinea", "ER" => "Eritrea", "EE" => "Estonia", "ET" => "Ethiopia", "FK" => "Falkland Islands (Malvinas)", "FO" => "Faroe Islands", "FJ" => "Fiji", "FI" => "Finland", "FR" => "France", "GF" => "French Guiana", "PF" => "French Polynesia", "TF" => "French Southern Territories", "GA" => "Gabon", "GM" => "Gambia, The", "GE" => "Georgia", "DE" => "Germany", "GH" => "Ghana", "GI" => "Gibraltar", "GR" => "Greece", "GL" => "Greenland", "GD" => "Grenada", "GP" => "Guadeloupe", "GU" => "Guam", "GT" => "Guatemala", "GG" => "Guernsey", "GN" => "Guinea", "GW" => "Guinea-Bissau", "GY" => "Guyana", "HT" => "Haiti", "HM" => "Heard Island and the McDonald Islands", "VA" => "Holy See", "HN" => "Honduras", "HK" => "Hong Kong", "HU" => "Hungary", "IS" => "Iceland", "IN" => "India", "ID" => "Indonesia", "IQ" => "Iraq", "IE" => "Ireland", "IM" => "Isle Of Man", "IL" => "Israel", "IT" => "Italy", "JM" => "Jamaica", "JP" => "Japan", "JE" => "Jersey", "JO" => "Jordan", "KZ" => "Kazakhstan", "KE" => "Kenya", "KI" => "Kiribati", "KR" => "Korea, Republic Of", "KW" => "Kuwait", "KG" => "Kyrgyzstan", "LA" => "Lao People's Democratic Republic", "LV" => "Latvia", "LB" => "Lebanon", "LS" => "Lesotho", "LR" => "Liberia", "LY" => "Libya", "LI" => "Liechtenstein", "LT" => "Lithuania", "LU" => "Luxembourg", "MO" => "Macao", "MK" => "Macedonia, The Former Yugoslav Republic Of", "MG" => "Madagascar", "MW" => "Malawi", "MY" => "Malaysia", "MV" => "Maldives", "ML" => "Mali", "MT" => "Malta", "MH" => "Marshall Islands", "MQ" => "Martinique", "MR" => "Mauritania", "MU" => "Mauritius", "YT" => "Mayotte", "MX" => "Mexico", "FM" => "Micronesia, Federated States Of", "MD" => "Moldova, Republic Of", "MC" => "Monaco", "MN" => "Mongolia", "ME" => "Montenegro", "MS" => "Montserrat", "MA" => "Morocco", "MZ" => "Mozambique", "MM" => "Myanmar", "NA" => "Namibia", "NR" => "Nauru", "NP" => "Nepal", "NL" => "Netherlands", "AN" => "Netherlands Antilles", "NC" => "New Caledonia", "NZ" => "New Zealand", "NI" => "Nicaragua", "NE" => "Niger", "NG" => "Nigeria", "NU" => "Niue", "NF" => "Norfolk Island", "MP" => "Northern Mariana Islands", "NO" => "Norway", "OM" => "Oman", "PK" => "Pakistan", "PW" => "Palau", "PS" => "Palestinian Territories", "PA" => "Panama", "PG" => "Papua New Guinea", "PY" => "Paraguay", "PE" => "Peru", "PH" => "Philippines", "PN" => "Pitcairn", "PL" => "Poland", "PT" => "Portugal", "PR" => "Puerto Rico", "QA" => "Qatar", "RE" => "Reunion", "RO" => "Romania", "RU" => "Russian Federation", "RW" => "Rwanda", "BL" => "Saint Barthelemy", "SH" => "Saint Helena", "KN" => "Saint Kitts and Nevis", "LC" => "Saint Lucia", "MF" => "Saint Martin", "PM" => "Saint Pierre and Miquelon", "VC" => "Saint Vincent and The Grenadines", "WS" => "Samoa", "SM" => "San Marino", "ST" => "Sao Tome and Principe", "SA" => "Saudi Arabia", "SN" => "Senegal", "RS" => "Serbia", "SC" => "Seychelles", "SL" => "Sierra Leone", "SG" => "Singapore", "SK" => "Slovakia", "SI" => "Slovenia", "SB" => "Solomon Islands", "SO" => "Somalia", "ZA" => "South Africa", "GS" => "South Georgia and the South Sandwich Islands", "ES" => "Spain", "LK" => "Sri Lanka", "SR" => "Suriname", "SJ" => "Svalbard and Jan Mayen", "SZ" => "Swaziland", "SE" => "Sweden", "CH" => "Switzerland", "TW" => "Taiwan", "TJ" => "Tajikistan", "TZ" => "Tanzania, United Republic Of", "TH" => "Thailand", "TL" => "Timor-leste", "TG" => "Togo", "TK" => "Tokelau", "TO" => "Tonga", "TT" => "Trinidad and Tobago", "TN" => "Tunisia", "TR" => "Turkey", "TM" => "Turkmenistan", "TC" => "Turks and Caicos Islands", "TV" => "Tuvalu", "UG" => "Uganda", "UA" => "Ukraine", "AE" => "United Arab Emirates", "GB" => "United Kingdom", "UM" => "United States Minor Outlying Islands", "UY" => "Uruguay", "UZ" => "Uzbekistan", "VU" => "Vanuatu", "VE" => "Venezuela", "VN" => "Vietnam", "VG" => "Virgin Islands, British", "VI" => "Virgin Islands, U.S.", "WF" => "Wallis and Futuna", "EH" => "Western Sahara", "YE" => "Yemen", "ZM" => "Zambia", "ZW" => "Zimbabwe");
     parent::__construct($label, $name, $options, $properties);
 }
Beispiel #25
0
 /**
  * Constructor
  *
  * @param string  $caption caption
  * @param string  $name    name
  * @param mixed   $value   Pre-selected value (or array of them).
  *                         Legal values are "-12" to "12" with some ".5"s strewn in ;-)
  * @param integer $size    Number of rows. "1" makes a drop-down-box.
  */
 public function __construct($caption, $name, $value = null, $size = 1)
 {
     parent::__construct($caption, $name, $value, $size);
     $this->addOptionArray(\XoopsLists::getTimeZoneList());
 }