ILIAS  trunk Revision v11.0_alpha-2645-g16283d3b3f8
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, \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,
\ilBiblAdminFactoryFacadeInterface  $facade 
)

ilTable constructor.

Definition at line 50 of file Table.php.

References $DIC, ilBiblAdminFieldGUI\checkPermissionBoolAndReturn(), 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  $calling_gui->checkPermissionBoolAndReturn('write')
66  );
67 
68  $this->components[] = $this->table = $this->ui_factory->table()->ordering(
69  $data_retrieval,
70  $this->lng->txt('filter'),
71  $columns,
72  new URI(
73  ILIAS_HTTP_PATH . "/" . $this->ctrl->getLinkTarget($this->calling_gui, \ilBiblAdminFieldGUI::CMD_SAVE_ORDERING)
74  )
75  )->withActions($actions)->withRequest(
76  $DIC->http()->request()
77  );
78  }
global $DIC
Definition: shib_login.php:26
Class ilChatroomConfigFileHandler .
+ Here is the call graph for this function:

Member Function Documentation

◆ getHTML()

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

Definition at line 139 of file Table.php.

139  : string
140  {
141  return $this->ui_renderer->render($this->components);
142  }
Class ilChatroomConfigFileHandler .

◆ getIdToken()

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

Definition at line 154 of file Table.php.

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

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

◆ getOrdering()

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

Definition at line 144 of file Table.php.

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

◆ 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 119 of file Table.php.

References ILIAS\Repository\ctrl().

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

119  : URI
120  {
121  return new URI(
122  ILIAS_HTTP_PATH . "/" . $this->ctrl->getLinkTarget(
123  $this->calling_gui,
124  $command
125  )
126  );
127  }
+ 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 129 of file Table.php.

References ILIAS\Repository\ctrl().

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

129  : URI
130  {
131  return new URI(
132  ILIAS_HTTP_PATH . "/" . $this->ctrl->getLinkTargetByClass(
133  $target_gui,
134  $command
135  )
136  );
137  }
+ 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 149 of file Table.php.

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

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

◆ initActions()

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

Definition at line 104 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().

104  : array
105  {
106  return [
107  'translate' => $this->ui_factory->table()->action()->single(
108  $this->lng->txt("translate"),
109  $this->url_builder->withURI($this->getURIWithTargetClass(\ilBiblTranslationGUI::class, \ilBiblTranslationGUI::CMD_DEFAULT)),
111  )
112  ];
113  }
getURIWithTargetClass(string $target_gui, string $command)
Definition: Table.php:129
+ 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 95 of file Table.php.

References ILIAS\Repository\lng().

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

95  : array
96  {
97  return [
98  'identifier' => $this->ui_factory->table()->column()->text($this->lng->txt('identifier')),
99  'data_type' => $this->ui_factory->table()->column()->text($this->lng->txt('translation')),
100  'is_standard_field' => $this->ui_factory->table()->column()->text($this->lng->txt('standard'))
101  ];
102  }
+ 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 80 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().

80  : URLBuilder
81  {
82  $url_builder = new URLBuilder(
84  );
85 
86  // these are the query parameters this instance is controlling
87  $query_params_namespace = ['bibl'];
89  $query_params_namespace,
91  );
92  return $url_builder;
93  }
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:119
+ 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: