ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
ILIAS\PersonalWorkspace\WorkspaceAccessRetrieval Class Reference
+ Inheritance diagram for ILIAS\PersonalWorkspace\WorkspaceAccessRetrieval:
+ Collaboration diagram for ILIAS\PersonalWorkspace\WorkspaceAccessRetrieval:

Public Member Functions

 __construct (protected \ilWorkspaceAccessHandler|\ilPortfolioAccessHandler $handler, protected int $node_id, protected \ilLanguage $lng)
 
 getData (array $fields, ?Range $range=null, ?Order $order=null, array $filter=[], array $parameters=[])
 
 count (array $filter, array $parameters)
 
 isFieldNumeric (string $field)
 
 getData (array $fields, ?Range $range=null, ?Order $order=null, array $filter=[], array $parameters=[])
 
 count (array $filter, array $parameters)
 
 isFieldNumeric (string $field)
 

Protected Member Functions

 collectData ()
 

Detailed Description

Definition at line 23 of file WorkspaceAccessRetrieval.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\PersonalWorkspace\WorkspaceAccessRetrieval::__construct ( protected \ilWorkspaceAccessHandler|\ilPortfolioAccessHandler  $handler,
protected int  $node_id,
protected \ilLanguage  $lng 
)

Definition at line 27 of file WorkspaceAccessRetrieval.php.

31 {
32 }

Member Function Documentation

◆ collectData()

ILIAS\PersonalWorkspace\WorkspaceAccessRetrieval::collectData ( )
protected

Definition at line 60 of file WorkspaceAccessRetrieval.php.

60 : array
61 {
62 $data = [];
63
64 foreach ($this->handler->getPermissions($this->node_id) as $obj_id) {
65 $title = null;
66 $caption = "";
67 $type_txt = "";
68
69 switch ($obj_id) {
70 case \ilWorkspaceAccessGUI::PERMISSION_REGISTERED:
71 $caption = $this->lng->txt("wsp_set_permission_registered");
72 $title = "0" . $caption;
73 break;
74
75 case \ilWorkspaceAccessGUI::PERMISSION_ALL_PASSWORD:
76 $caption = $this->lng->txt("wsp_set_permission_all_password");
77 $title = "0" . $caption;
78 break;
79
80 case \ilWorkspaceAccessGUI::PERMISSION_ALL:
81 $caption = $this->lng->txt("wsp_set_permission_all");
82 $title = "0" . $caption;
83 break;
84
85 default:
86 $type = \ilObject::_lookupType($obj_id);
87 if ($type === "") {
88 continue 2;
89 }
90
91 $type_txt = $this->lng->txt("obj_" . $type);
92 if ($type !== "usr") {
93 $title = $caption = \ilObject::_lookupTitle($obj_id);
94 } else {
95 $caption = \ilUserUtil::getNamePresentation($obj_id, false, true);
96 $title = strip_tags($caption);
97 }
98 break;
99 }
100
101 if ($title) {
102 $data[] = [
103 "id" => $obj_id,
104 "title" => $title,
105 "caption" => $caption,
106 "type" => $type_txt
107 ];
108 }
109 }
110
111 return $data;
112 }
static _lookupType(int $id, bool $reference=false)
static _lookupTitle(int $obj_id)
static getNamePresentation( $a_user_id, bool $a_user_image=false, bool $a_profile_link=false, string $a_profile_back_link='', bool $a_force_first_lastname=false, bool $a_omit_login=false, bool $a_sortable=true, bool $a_return_data_array=false, $a_ctrl_path=null)
Default behaviour is:
$data
Definition: storeScorm.php:45

References $data, ilObject\_lookupTitle(), ilObject\_lookupType(), ilUserUtil\getNamePresentation(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ count()

ILIAS\PersonalWorkspace\WorkspaceAccessRetrieval::count ( array  $filter,
array  $parameters 
)

◆ getData()

ILIAS\PersonalWorkspace\WorkspaceAccessRetrieval::getData ( array  $fields,
?Range  $range = null,
?Order  $order = null,
array  $filter = [],
array  $parameters = [] 
)

Implements ILIAS\Repository\RetrievalInterface.

Definition at line 34 of file WorkspaceAccessRetrieval.php.

40 : \Generator {
41 $data = $this->collectData();
42 $data = $this->applyOrder($data, $order);
43 $data = $this->applyRange($data, $range);
44
45 foreach ($data as $row) {
46 yield $row;
47 }
48 }

◆ isFieldNumeric()

ILIAS\PersonalWorkspace\WorkspaceAccessRetrieval::isFieldNumeric ( string  $field)

Implements ILIAS\Repository\RetrievalInterface.

Definition at line 55 of file WorkspaceAccessRetrieval.php.

55 : bool
56 {
57 return $field === "id";
58 }

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