ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\Bibliographic\Field\Table Class Reference

Class ilTable. More...

+ Collaboration diagram for ILIAS\Bibliographic\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)
 @description 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\Bibliographic\Field\Table::__construct ( private \ilBiblAdminFieldGUI  $calling_gui,
\ilBiblAdminFactoryFacadeInterface  $facade 
)

ilTable constructor.

Definition at line 50 of file Table.php.

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 }
Class ilChatroomConfigFileHandler \ILIAS\Chatroom\classes.
global $DIC
Definition: shib_login.php:26

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

+ Here is the call graph for this function:

Member Function Documentation

◆ getHTML()

ILIAS\Bibliographic\Field\Table::getHTML ( )

Definition at line 139 of file Table.php.

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

◆ getIdToken()

ILIAS\Bibliographic\Field\Table::getIdToken ( )

Definition at line 154 of file Table.php.

155 {
156 return $this->id_token;
157 }
URLBuilderToken $id_token
Definition: Table.php:42

References ILIAS\Bibliographic\Field\Table\$id_token.

◆ getOrdering()

ILIAS\Bibliographic\Field\Table::getOrdering ( )

Definition at line 144 of file Table.php.

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

◆ getURI()

ILIAS\Bibliographic\Field\Table::getURI ( string  $command)
protected

@description 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.

119 : URI
120 {
121 return new URI(
122 ILIAS_HTTP_PATH . "/" . $this->ctrl->getLinkTarget(
123 $this->calling_gui,
124 $command
125 )
126 );
127 }

References ILIAS\Repository\ctrl().

Referenced by ILIAS\Bibliographic\Field\Table\initURIBuilder().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getURIWithTargetClass()

ILIAS\Bibliographic\Field\Table::getURIWithTargetClass ( string  $target_gui,
string  $command 
)
protected

Definition at line 129 of file Table.php.

129 : URI
130 {
131 return new URI(
132 ILIAS_HTTP_PATH . "/" . $this->ctrl->getLinkTargetByClass(
133 $target_gui,
134 $command
135 )
136 );
137 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ getUrlBuilder()

ILIAS\Bibliographic\Field\Table::getUrlBuilder ( )

Definition at line 149 of file Table.php.

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

References ILIAS\Bibliographic\Field\Table\$url_builder.

◆ initActions()

ILIAS\Bibliographic\Field\Table::initActions ( )
protected

Definition at line 104 of file Table.php.

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)),
110 $this->id_token
111 )
112 ];
113 }

References ilBiblTranslationGUI\CMD_DEFAULT, and ILIAS\Repository\lng().

Referenced by ILIAS\Bibliographic\Field\Table\__construct().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initColumns()

ILIAS\Bibliographic\Field\Table::initColumns ( )
protected

Definition at line 95 of file Table.php.

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 }

References ILIAS\Repository\lng().

Referenced by ILIAS\Bibliographic\Field\Table\__construct().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initURIBuilder()

ILIAS\Bibliographic\Field\Table::initURIBuilder ( )
private

Definition at line 80 of file Table.php.

81 {
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 }
getURI(string $command)
@description Unfortunately, I have not yet found an easier way to generate this URI.
Definition: Table.php:119
acquireParameters(array $namespace, string ... $names)
Definition: URLBuilder.php:138

References ILIAS\Bibliographic\Field\Table\$id_token, ILIAS\Bibliographic\Field\Table\$url_builder, ILIAS\UI\URLBuilder\acquireParameters(), ilBiblAdminFieldGUI\CMD_STANDARD, ilBiblAdminFieldGUI\FIELD_IDENTIFIER, and ILIAS\Bibliographic\Field\Table\getURI().

Referenced by ILIAS\Bibliographic\Field\Table\__construct().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $components

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

Definition at line 45 of file Table.php.

◆ $ctrl

ilCtrlInterface ILIAS\Bibliographic\Field\Table::$ctrl
private

Definition at line 39 of file Table.php.

◆ $id_token

URLBuilderToken ILIAS\Bibliographic\Field\Table::$id_token
private

◆ $lng

ilLanguage ILIAS\Bibliographic\Field\Table::$lng
private

Definition at line 40 of file Table.php.

◆ $table

Ordering ILIAS\Bibliographic\Field\Table::$table
private

Definition at line 43 of file Table.php.

◆ $ui_factory

Factory ILIAS\Bibliographic\Field\Table::$ui_factory
private

Definition at line 37 of file Table.php.

◆ $ui_renderer

Renderer ILIAS\Bibliographic\Field\Table::$ui_renderer
private

Definition at line 38 of file Table.php.

◆ $url_builder

URLBuilder ILIAS\Bibliographic\Field\Table::$url_builder
private

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