ILIAS  release_8 Revision v8.24
class.ilCountrySelectInputGUI.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
27{
28 public function __construct(
29 string $a_title = "",
30 string $a_postvar = ""
31 ) {
32 global $DIC;
33
34 $this->lng = $DIC->language();
35 parent::__construct($a_title, $a_postvar);
36 $this->setType("cselect");
37 }
38
39 public function getOptions(): array
40 {
42
43 $lng->loadLanguageModule("meta");
44 $lng->loadLanguageModule("form");
45
46 foreach (ilCountry::getCountryCodes() as $c) {
47 $options[$c] = $lng->txt("meta_c_" . $c);
48 }
49 asort($options);
50
51 $options = array("" => "- " . $lng->txt("form_please_select") . " -")
52 + $options;
53
54 return $options;
55 }
56}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(string $a_title="", string $a_postvar="")
static getCountryCodes()
Get country codes (DIN EN 3166-1)
loadLanguageModule(string $a_module)
Load language module.
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
This class represents a selection list property in a property form.
$c
Definition: cli.php:38
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc