ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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{
20 protected $lng;
21
22
29 public function __construct($a_title = "", $a_postvar = "")
30 {
31 global $DIC;
32
33 $this->lng = $DIC->language();
34 parent::__construct($a_title, $a_postvar);
35 $this->setType("cselect");
36 }
37
43 public function getOptions()
44 {
46
47 $lng->loadLanguageModule("meta");
48 $lng->loadLanguageModule("form");
49
50 include_once("./Services/Utilities/classes/class.ilCountry.php");
51
52 foreach (ilCountry::getCountryCodes() as $c) {
53 $options[$c] = $lng->txt("meta_c_" . $c);
54 }
55 asort($options);
56
57 $options = array("" => "- " . $lng->txt("form_please_select") . " -")
58 + $options;
59
60 return $options;
61 }
62}
An exception for terminatinating execution or to throw for unit testing.
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.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$DIC
Definition: xapitoken.php:46