本文整理匯總了PHP中XoopsFormSelect::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP XoopsFormSelect::__construct方法的具體用法?PHP XoopsFormSelect::__construct怎麽用?PHP XoopsFormSelect::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類XoopsFormSelect
的用法示例。
在下文中一共展示了XoopsFormSelect::__construct方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
/**
* Constructor
*
* @param string $caption
* @param string $name
* @param mixed $value Pre-selected value (or array of them).
* Legal values are {@link XOOPS_MATCH_START}, {@link XOOPS_MATCH_END},
* {@link XOOPS_MATCH_EQUAL}, and {@link XOOPS_MATCH_CONTAIN}
* @param int $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, _STARTSWITH);
$this->addOption(XOOPS_MATCH_END, _ENDSWITH);
$this->addOption(XOOPS_MATCH_EQUAL, _MATCHES);
$this->addOption(XOOPS_MATCH_CONTAIN, _CONTAINS);
}
示例2: __construct
/**
* Constructor
*
* @param string $caption
* @param string $name
* @param mixed $value Pre-selected value (or array of them).
* @param int $size Number or rows. "1" makes a drop-down-list
* @param bool $theme_set_allowed Flag to use only selectable theme
*/
public function __construct($caption, $name, $value = null, $size = 1, $theme_set_allowed = false)
{
parent::__construct($caption, $name, $value, $size);
if ($theme_set_allowed === false) {
$this->addOptionArray(XoopsLists::getThemesList());
} else {
$theme_arr = $GLOBALS['xoopsConfig']['theme_set_allowed'];
foreach (array_keys($theme_arr) as $i) {
$this->addOption($theme_arr[$i], $theme_arr[$i]);
}
}
}
示例3: __construct
/**
* Constructor
*
* @param string $caption
* @param string $name
* @param mixed $value Pre-selected value (or array of them).
* Legal is any name of a XOOPS_ROOT_PATH."/language/" subdirectory.
* @param int $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);
$this->addOptionArray(XoopsLists::getLangList());
}
示例4: __construct
/**
* Constructor
*
* @param string $caption Caption
* @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, $value = null, $size = 1)
{
parent::__construct($caption, $name, $value, $size);
// $this->XoopsFormSelect($caption, $name, $value, $size);
$this->addOptionArray(XoopsLists::getCountryList());
}