ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilCountrySelectInputGUI.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5
6include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
7
16{
17
24 function __construct($a_title = "", $a_postvar = "")
25 {
26 parent::__construct($a_title, $a_postvar);
27 $this->setType("cselect");
28 }
29
35 public function getOptions()
36 {
37 global $lng;
38
39 $lng->loadLanguageModule("meta");
40 $lng->loadLanguageModule("form");
41
42 include_once("./Services/Utilities/classes/class.ilCountry.php");
43
44 foreach (ilCountry::getCountryCodes() as $c)
45 {
46 $options[$c] = $lng->txt("meta_c_".$c);
47 }
48 asort($options);
49
50 $options = array("" => "- ".$lng->txt("form_please_select")." -")
51 + $options;
52
53 return $options;
54 }
55}
This class represents a selection list property in a property form.
__construct($a_title="", $a_postvar="")
Constructor.
static getCountryCodes()
Get country codes (DIN EN 3166-1)
setType($a_type)
Set Type.
This class represents a selection list property in a property form.
global $lng
Definition: privfeed.php:40