ILIAS  trunk Revision v11.0_alpha-1749-g1a06bdef097
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilDashboardPageLanguageSelectGUI Class Reference

@ilCtrl_isCalledBy ilDashboardPageLanguageSelectGUI: ilObjDashboardSettingsGUI More...

+ Collaboration diagram for ilDashboardPageLanguageSelectGUI:

Public Member Functions

 __construct ()
 
 executeCommand ()
 
 select ()
 

Protected Attributes

Container $dic
 

Private Attributes

ilDashboardPage $page
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilDashboardPageLanguageSelectGUI::__construct ( )

Definition at line 34 of file class.ilDashboardPageLanguageSelectGUI.php.

References $DIC.

35  {
36  global $DIC;
37  $this->dic = $DIC;
38  $this->page = new ilDashboardPage();
39  }
global $DIC
Definition: shib_login.php:22

Member Function Documentation

◆ executeCommand()

ilDashboardPageLanguageSelectGUI::executeCommand ( )

Definition at line 41 of file class.ilDashboardPageLanguageSelectGUI.php.

References $lang, and select().

41  : void
42  {
43  if ($this->dic->ctrl()->getNextClass() === strtolower(ilDashboardPageGUI::class)) {
44  $lang = $this->dic->http()->wrapper()->query()->retrieve(
45  $this->page->getParentType() . '_lang',
46  $this->dic->refinery()->kindlyTo()->listOf($this->dic->refinery()->to()->string())
47  )[0] ?? '';
48  $this->dic->ui()->mainTemplate()->setContent($this->dic->ctrl()->forwardCommand(new ilDashboardPageGUI($lang)));
49  } else {
50  if ($this->dic->language()->getInstalledLanguages() === [$this->dic->language()->getDefaultLanguage()]) {
51  $this->dic->ctrl()->setParameterByClass(ilDashboardPageGUI::class, 'dshs_lang', $this->dic->language()->getDefaultLanguage());
52  $this->dic->ctrl()->redirectByClass(ilDashboardPageGUI::class, 'edit');
53  }
54  $this->select();
55  }
56  }
ilDashboardPageGUI: ilPageEditorGUI, ilEditClipboardGUI, ilMDEditorGUI ilDashboardPageGUI: ilAdminis...
$lang
Definition: xapiexit.php:25
+ Here is the call graph for this function:

◆ select()

ilDashboardPageLanguageSelectGUI::select ( )

Definition at line 58 of file class.ilDashboardPageLanguageSelectGUI.php.

References $token.

Referenced by executeCommand().

58  : void
59  {
60  $url_builder = new URLBuilder(new URI(
61  ILIAS_HTTP_PATH . '/' . $this->dic->ctrl()->getLinkTargetByClass(ilDashboardPageGUI::class, 'edit')
62  ));
63  list($builder, $token) = $url_builder->acquireParameters([$this->page->getParentType()], 'lang');
64  $actions[] = $this->dic->ui()->factory()->table()->action()->single(
65  $this->dic->language()->txt('edit'),
66  $builder,
67  $token
68  );
69 
70  $table = $this->dic->ui()->factory()->table()->data(
71  new Language(),
72  $this->dic->language()->txt('dash_co_lang'),
73  [
74  'name' => $this->dic->ui()->factory()->table()->column()->text($this->dic->language()->txt('language'))->withIsSortable(false),
75  'user_count' => $this->dic->ui()->factory()->table()->column()->text($this->dic->language()->txt('users'))->withIsSortable(false)
76  ],
77  )->withActions($actions);
78 
79  $this->dic->ui()->mainTemplate()->setContent(
80  $this->dic->ui()->renderer()->render($table->withRequest($this->dic->http()->request()))
81  );
82  }
$token
Definition: xapitoken.php:70
URLBuilder.
Definition: URLBuilder.php:40
+ Here is the caller graph for this function:

Field Documentation

◆ $dic

Container ilDashboardPageLanguageSelectGUI::$dic
protected

Definition at line 31 of file class.ilDashboardPageLanguageSelectGUI.php.

◆ $page

ilDashboardPage ilDashboardPageLanguageSelectGUI::$page
private

Definition at line 32 of file class.ilDashboardPageLanguageSelectGUI.php.


The documentation for this class was generated from the following file: