ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\Repository\Ownership\OwnershipManagementTableBuilder Class Reference
+ Inheritance diagram for ILIAS\Repository\Ownership\OwnershipManagementTableBuilder:
+ Collaboration diagram for ILIAS\Repository\Ownership\OwnershipManagementTableBuilder:

Public Member Functions

 __construct (protected InternalDomainService $domain, protected InternalGUIService $gui, protected int $user_id, protected string $title, protected array $objects, protected string $selected_type, object $parent_gui, string $parent_cmd)
 
- Public Member Functions inherited from ILIAS\Repository\Table\CommonTableBuilder
 __construct (protected object $parent_gui, protected string $parent_cmd, bool $numeric_ids=true)
 
 getTable ()
 

Protected Member Functions

 getId ()
 
 getTitle ()
 
 getRetrieval ()
 
 transformRow (array $data_row)
 transform raw data array to table row data array More...
 
 activeAction (string $action, array $data_row)
 
 build (TableAdapterGUI $table)
 
- Protected Member Functions inherited from ILIAS\Repository\Table\CommonTableBuilder
 getId ()
 
 getTitle ()
 
 getRetrieval ()
 
 getNamespace ()
 
 getOrderingCommand ()
 
 activeAction (string $action, array $data_row)
 
 transformRow (array $data_row)
 transform raw data array to table row data array More...
 
 build (TableAdapterGUI $table)
 

Additional Inherited Members

- Protected Attributes inherited from ILIAS\Repository\Table\CommonTableBuilder
TableAdapterGUI $table
 

Detailed Description

Definition at line 30 of file OwnershipManagementTableBuilder.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Repository\Ownership\OwnershipManagementTableBuilder::__construct ( protected InternalDomainService  $domain,
protected InternalGUIService  $gui,
protected int  $user_id,
protected string  $title,
protected array  $objects,
protected string  $selected_type,
object  $parent_gui,
string  $parent_cmd 
)

Definition at line 32 of file OwnershipManagementTableBuilder.php.

41 {
42 parent::__construct($parent_gui, $parent_cmd);
43 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References ILIAS\GlobalScreen\Provider\__construct().

+ Here is the call graph for this function:

Member Function Documentation

◆ activeAction()

ILIAS\Repository\Ownership\OwnershipManagementTableBuilder::activeAction ( string  $action,
array  $data_row 
)
protected

Reimplemented from ILIAS\Repository\Table\CommonTableBuilder.

Definition at line 88 of file OwnershipManagementTableBuilder.php.

88 : bool
89 {
90 if (!$data_row['readable']) {
91 return false;
92 }
93
94 if ($action === 'export') {
95 $obj_definition = $this->domain->objectDefinition();
96 $type = $data_row['type'];
97 if (in_array($type, ['crsr', 'catr', 'grpr']) || !$obj_definition->allowExport($type)) {
98 return false;
99 }
100 }
101
102 if ($action === 'show') {
103 return true; // Show action should always be available for readable items
104 }
105
106 if (!method_exists($this->parent_gui, 'isReadOnly')) {
107 return true;
108 }
109
110 return !$this->parent_gui->isReadOnly();
111 }

◆ build()

ILIAS\Repository\Ownership\OwnershipManagementTableBuilder::build ( TableAdapterGUI  $table)
protected

Reimplemented from ILIAS\Repository\Table\CommonTableBuilder.

Definition at line 113 of file OwnershipManagementTableBuilder.php.

113 : TableAdapterGUI
114 {
115 $lng = $this->domain->lng();
116
117 $table = $table
118 ->iconColumn('icon', $lng->txt('type'), false)
119 ->textColumn('title', $lng->txt('title'), true)
120 ->textColumn('path', $lng->txt('path'));
121
123 'show',
124 $lng->txt('show')
125 );
126
128 'move',
129 $lng->txt('move')
130 );
131
133 'changeOwner',
134 $lng->txt('change_owner')
135 );
136
138 'export',
139 $lng->txt('export')
140 );
141
143 'delete',
144 $lng->txt('delete')
145 );
146
147 return $table;
148 }
singleAction(string $action, string $title, bool $async=false)
iconColumn(string $key, string $title, bool $sortable=false)
global $lng
Definition: privfeed.php:31

References $lng, ILIAS\Repository\Table\CommonTableBuilder\$table, ILIAS\Repository\Table\TableAdapterGUI\iconColumn(), and ILIAS\Repository\Table\TableAdapterGUI\singleAction().

+ Here is the call graph for this function:

◆ getId()

ILIAS\Repository\Ownership\OwnershipManagementTableBuilder::getId ( )
protected

Reimplemented from ILIAS\Repository\Table\CommonTableBuilder.

Definition at line 45 of file OwnershipManagementTableBuilder.php.

45 : string
46 {
47 return 'objownmgmt';
48 }

◆ getRetrieval()

ILIAS\Repository\Ownership\OwnershipManagementTableBuilder::getRetrieval ( )
protected

Reimplemented from ILIAS\Repository\Table\CommonTableBuilder.

Definition at line 55 of file OwnershipManagementTableBuilder.php.

55 : RetrievalInterface
56 {
57 return new OwnershipManagementRetrieval(
58 $this->domain,
59 $this->user_id,
60 $this->objects,
61 $this->selected_type
62 );
63 }

◆ getTitle()

ILIAS\Repository\Ownership\OwnershipManagementTableBuilder::getTitle ( )
protected

Reimplemented from ILIAS\Repository\Table\CommonTableBuilder.

Definition at line 50 of file OwnershipManagementTableBuilder.php.

50 : string
51 {
52 return $this->title;
53 }

◆ transformRow()

ILIAS\Repository\Ownership\OwnershipManagementTableBuilder::transformRow ( array  $data_row)
protected

transform raw data array to table row data array

Reimplemented from ILIAS\Repository\Table\CommonTableBuilder.

Definition at line 65 of file OwnershipManagementTableBuilder.php.

65 : array
66 {
67 $f = $this->gui->ui()->factory();
68 $refinery = $this->domain->refinery();
69
70 $icon = $f->symbol()->icon()->standard(
71 $data_row['type'],
72 $data_row['title'],
74 );
75
76 return [
77 'id' => $data_row['ref_id'],
78 'icon' => $icon,
79 'title' => $refinery->encode()->htmlSpecialCharsAsEntities()->transform(
80 $data_row['title']
81 ),
82 'path' => $data_row['path'],
83 'type' => $data_row['type'],
84 'readable' => $data_row['readable']
85 ];
86 }
Refinery Factory $refinery

References Vendor\Package\$f, ILIAS\Repository\$refinery, and ILIAS\UI\Component\Symbol\Icon\Icon\MEDIUM.


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