本文整理汇总了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());
}