ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
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 
6 include_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 }