ILIAS  trunk Revision v11.0_alpha-1831-g8615d53dadb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\components\Database\Integrity\Field\Table Class Reference

Class ilTable. More...

+ Collaboration diagram for ILIAS\components\Database\Integrity\Field\Table:

Public Member Functions

 __construct (private \ilBiblAdminFieldGUI $calling_gui, private \ilBiblAdminFactoryFacadeInterface $facade)
 ilTable constructor. More...
 
 getHTML ()
 
 getOrdering ()
 
 getUrlBuilder ()
 
 getIdToken ()
 

Protected Member Functions

 initColumns ()
 
 initActions ()
 
 getURI (string $command)
 Unfortunately, I have not yet found an easier way to generate this URI. More...
 
 getURIWithTargetClass (string $target_gui, string $command)
 

Protected Attributes

array $components = []
 

Private Member Functions

 initURIBuilder ()
 

Private Attributes

Factory $ui_factory
 
Renderer $ui_renderer
 
ilCtrlInterface $ctrl
 
ilLanguage $lng
 
URLBuilder $url_builder
 
URLBuilderToken $id_token
 
Ordering $table
 

Detailed Description

Class ilTable.

Definition at line 35 of file Table.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\components\Database\Integrity\Field\Table::__construct ( private \ilBiblAdminFieldGUI  $calling_gui,
private \ilBiblAdminFactoryFacadeInterface  $facade 
)

ilTable constructor.

Definition at line 50 of file Table.php.

References $DIC, ilBiblAdminFieldGUI\CMD_SAVE_ORDERING, ILIAS\Repository\ctrl(), ILIAS\components\Database\Integrity\Field\Table\initActions(), ILIAS\components\Database\Integrity\Field\Table\initColumns(), ILIAS\components\Database\Integrity\Field\Table\initURIBuilder(), and ILIAS\Repository\lng().

53  {
54  global $DIC;
55  $this->ui_factory = $DIC['ui.factory'];
56  $this->ui_renderer = $DIC['ui.renderer'];
57  $this->ctrl = $DIC['ilCtrl'];
58  $this->lng = $DIC['lng'];
59 
60  $this->url_builder = $this->initURIBuilder();
61  $columns = $this->initColumns();
62  $actions = $this->initActions();
63  $data_retrieval = new DataRetrieval(
64  $facade
65  );
66 
67  $this->components[] = $this->table = $this->ui_factory->table()->ordering(
68  $data_retrieval,
69  $this->lng->txt('filter'),
70  $columns,
71  new URI(
72  ILIAS_HTTP_PATH . "/" . $this->ctrl->getLinkTarget($this->calling_gui, \ilBiblAdminFieldGUI::CMD_SAVE_ORDERING)
73  )
74  )->withActions($actions)->withRequest(
75  $DIC->http()->request()
76  );
77  }
global $DIC
Definition: shib_login.php:22
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

Member Function Documentation

◆ getHTML()

ILIAS\components\Database\Integrity\Field\Table::getHTML ( )

Definition at line 138 of file Table.php.

138  : string
139  {
140  return $this->ui_renderer->render($this->components);
141  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ getIdToken()

ILIAS\components\Database\Integrity\Field\Table::getIdToken ( )

Definition at line 153 of file Table.php.

References ILIAS\components\Database\Integrity\Field\Table\$id_token.

153  : URLBuilderToken
154  {
155  return $this->id_token;
156  }

◆ getOrdering()

ILIAS\components\Database\Integrity\Field\Table::getOrdering ( )

Definition at line 143 of file Table.php.

143  : array
144  {
145  return $this->table->getData();
146  }

◆ getURI()

ILIAS\components\Database\Integrity\Field\Table::getURI ( string  $command)
protected

Unfortunately, I have not yet found an easier way to generate this URI.

However, it is important that it points to the calling-gui

Definition at line 118 of file Table.php.

References ILIAS\Repository\ctrl().

Referenced by ILIAS\components\Database\Integrity\Field\Table\initURIBuilder().

118  : URI
119  {
120  return new URI(
121  ILIAS_HTTP_PATH . "/" . $this->ctrl->getLinkTarget(
122  $this->calling_gui,
123  $command
124  )
125  );
126  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getURIWithTargetClass()

ILIAS\components\Database\Integrity\Field\Table::getURIWithTargetClass ( string  $target_gui,
string  $command 
)
protected

Definition at line 128 of file Table.php.

References ILIAS\Repository\ctrl().

Referenced by ILIAS\components\Database\Integrity\Field\Table\initActions().

128  : URI
129  {
130  return new URI(
131  ILIAS_HTTP_PATH . "/" . $this->ctrl->getLinkTargetByClass(
132  $target_gui,
133  $command
134  )
135  );
136  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getUrlBuilder()

ILIAS\components\Database\Integrity\Field\Table::getUrlBuilder ( )

Definition at line 148 of file Table.php.

References ILIAS\components\Database\Integrity\Field\Table\$url_builder.

148  : URLBuilder
149  {
150  return $this->url_builder;
151  }

◆ initActions()

ILIAS\components\Database\Integrity\Field\Table::initActions ( )
protected

Definition at line 103 of file Table.php.

References ILIAS\components\Database\Integrity\Field\Table\$id_token, ilBiblTranslationGUI\CMD_DEFAULT, ILIAS\components\Database\Integrity\Field\Table\getURIWithTargetClass(), and ILIAS\Repository\lng().

Referenced by ILIAS\components\Database\Integrity\Field\Table\__construct().

103  : array
104  {
105  return [
106  'translate' => $this->ui_factory->table()->action()->single(
107  $this->lng->txt("translate"),
108  $this->url_builder->withURI($this->getURIWithTargetClass(\ilBiblTranslationGUI::class, \ilBiblTranslationGUI::CMD_DEFAULT)),
110  )
111  ];
112  }
getURIWithTargetClass(string $target_gui, string $command)
Definition: Table.php:128
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initColumns()

ILIAS\components\Database\Integrity\Field\Table::initColumns ( )
protected

Definition at line 94 of file Table.php.

References ILIAS\Repository\lng().

Referenced by ILIAS\components\Database\Integrity\Field\Table\__construct().

94  : array
95  {
96  return [
97  'identifier' => $this->ui_factory->table()->column()->text($this->lng->txt('identifier')),
98  'data_type' => $this->ui_factory->table()->column()->text($this->lng->txt('translation')),
99  'is_standard_field' => $this->ui_factory->table()->column()->text($this->lng->txt('standard'))
100  ];
101  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initURIBuilder()

ILIAS\components\Database\Integrity\Field\Table::initURIBuilder ( )
private

Definition at line 79 of file Table.php.

References ILIAS\components\Database\Integrity\Field\Table\$id_token, ILIAS\components\Database\Integrity\Field\Table\$url_builder, ilBiblAdminFieldGUI\CMD_STANDARD, ilBiblAdminFieldGUI\FIELD_IDENTIFIER, and ILIAS\components\Database\Integrity\Field\Table\getURI().

Referenced by ILIAS\components\Database\Integrity\Field\Table\__construct().

79  : URLBuilder
80  {
81  $url_builder = new URLBuilder(
83  );
84 
85  // these are the query parameters this instance is controlling
86  $query_params_namespace = ['bibl'];
88  $query_params_namespace,
90  );
91  return $url_builder;
92  }
acquireParameters(array $namespace, string ... $names)
Definition: URLBuilder.php:138
getURI(string $command)
Unfortunately, I have not yet found an easier way to generate this URI.
Definition: Table.php:118
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $components

array ILIAS\components\Database\Integrity\Field\Table::$components = []
protected

Definition at line 45 of file Table.php.

◆ $ctrl

ilCtrlInterface ILIAS\components\Database\Integrity\Field\Table::$ctrl
private

Definition at line 39 of file Table.php.

◆ $id_token

◆ $lng

ilLanguage ILIAS\components\Database\Integrity\Field\Table::$lng
private

Definition at line 40 of file Table.php.

◆ $table

Ordering ILIAS\components\Database\Integrity\Field\Table::$table
private

Definition at line 43 of file Table.php.

◆ $ui_factory

Factory ILIAS\components\Database\Integrity\Field\Table::$ui_factory
private

Definition at line 37 of file Table.php.

◆ $ui_renderer

Renderer ILIAS\components\Database\Integrity\Field\Table::$ui_renderer
private

Definition at line 38 of file Table.php.

◆ $url_builder

URLBuilder ILIAS\components\Database\Integrity\Field\Table::$url_builder
private

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