/** * 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); }
/** * XoopsLists::getCountryList() * * @return array */ public static function getCountryList() { return \Xoops\Core\Lists\Country::getList(); }