ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
ILIAS\UI\Component\Legacy\Content\DomainService Class Reference
+ Collaboration diagram for ILIAS\UI\Component\Legacy\Content\DomainService:

Public Member Functions

 __construct (InternalRepoService $repo_service, InternalDataService $data_service, InternalDomainService $domain_service)
 
 items (\ilContainer $container)
 Controls item state (e.g. More...
 
 itemPresentation (\ilContainer $container, ?\ilContainerUserFilter $container_user_filter, bool $include_empty_blocks=true, ?string $lang=null)
 Manages item retrieval, filtering, grouping and sorting. More...
 
 itemSetFlat (int $ref_id, ?\ilContainerUserFilter $user_filter, bool $force_session_order_by_date=true)
 Manages set of conatiner items (flat version) More...
 
 itemSetTree (int $ref_id, ?\ilContainerUserFilter $user_filter)
 Manages set of conatiner items (flat version) More...
 
 itemSetSingle (int $ref_id, int $single_ref_id)
 Manages set of conatiner items (single item version) More...
 
 view (\ilContainer $container)
 
 mode (\ilContainer $container)
 Controls admin/content view state Note: The node manager currently holds "state". More...
 
 filter (array $objects, ?\ilContainerUserFilter $container_user_filter, bool $results_on_filter_only=false)
 
 itemBlockSequenceGenerator (\ilContainer $container, BlockSequence $block_sequence, ItemSetManager $item_set_manager, bool $include_empty_blocks=true, ?string $lang=null)
 

Protected Attributes

ILIAS COPage PC Resources ResourcesManager $copage_resources
 
ILIAS Repository Clipboard ClipboardManager $repo_clipboard
 
InternalRepoService $repo_service
 
InternalDataService $data_service
 
InternalDomainService $domain_service
 
ItemSessionRepository $item_repo
 
ModeSessionRepository $mode_repo
 

Static Protected Attributes

static array $mode_managers = []
 
static array $flat_item_set_managers = []
 
static array $tree_item_set_managers = []
 

Detailed Description

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 32 of file class.DomainService.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\UI\Component\Legacy\Content\DomainService::__construct ( InternalRepoService  $repo_service,
InternalDataService  $data_service,
InternalDomainService  $domain_service 
)

Definition at line 57 of file class.DomainService.php.

References ILIAS\UI\Component\Legacy\Content\DomainService\$data_service, $DIC, ILIAS\UI\Component\Legacy\Content\DomainService\$domain_service, and ILIAS\UI\Component\Legacy\Content\DomainService\$repo_service.

61  {
62  global $DIC;
63 
64  $this->repo_clipboard = $DIC
65  ->repository()
66  ->internal()
67  ->domain()
68  ->clipboard();
69 
70  $this->repo_service = $repo_service;
71  $this->data_service = $data_service;
72  $this->domain_service = $domain_service;
73  $this->item_repo = $this->repo_service->content()->item();
74  $this->mode_repo = $this->repo_service->content()->mode();
75  $this->copage_resources = $DIC->copage()->internal()->domain()->pc()->resources();
76  }
global $DIC
Definition: shib_login.php:26

Member Function Documentation

◆ filter()

ILIAS\UI\Component\Legacy\Content\DomainService::filter ( array  $objects,
?\ilContainerUserFilter  $container_user_filter,
bool  $results_on_filter_only = false 
)
Parameters
array[]$objects each array must contain the keys "obj_id" and "type"

Definition at line 237 of file class.DomainService.php.

241  : FilterManager {
242  return new FilterManager(
243  $this,
244  $this->repo_service->content(),
245  $this->domain_service->metadata(),
246  $objects,
247  $container_user_filter,
248  $results_on_filter_only
249  );
250  }

◆ itemBlockSequenceGenerator()

ILIAS\UI\Component\Legacy\Content\DomainService::itemBlockSequenceGenerator ( \ilContainer  $container,
BlockSequence  $block_sequence,
ItemSetManager  $item_set_manager,
bool  $include_empty_blocks = true,
?string  $lang = null 
)

Definition at line 252 of file class.DomainService.php.

References $container, ILIAS\UI\Component\Legacy\Content\DomainService\$copage_resources, ILIAS\UI\Component\Legacy\Content\DomainService\$domain_service, and $lang.

258  : ItemBlockSequenceGenerator {
259  return new ItemBlockSequenceGenerator(
260  $this->data_service->content(),
263  $container,
264  $block_sequence,
265  $item_set_manager,
266  $include_empty_blocks,
267  $lang
268  );
269  }
ILIAS COPage PC Resources ResourcesManager $copage_resources
$container
Definition: wac.php:36
$lang
Definition: xapiexit.php:25

◆ itemPresentation()

ILIAS\UI\Component\Legacy\Content\DomainService::itemPresentation ( \ilContainer  $container,
?\ilContainerUserFilter  $container_user_filter,
bool  $include_empty_blocks = true,
?string  $lang = null 
)

Manages item retrieval, filtering, grouping and sorting.

Definition at line 97 of file class.DomainService.php.

References $lang.

102  : ItemPresentationManager {
103  return new ItemPresentationManager(
104  $this->domain_service,
105  $container,
106  $container_user_filter,
107  $this->repo_clipboard,
108  $include_empty_blocks,
109  $lang
110  );
111  }
$container
Definition: wac.php:36
$lang
Definition: xapiexit.php:25

◆ items()

ILIAS\UI\Component\Legacy\Content\DomainService::items ( \ilContainer  $container)

Controls item state (e.g.

expanded)

Definition at line 81 of file class.DomainService.php.

References $DIC, and ILIAS\UI\Component\Legacy\Content\DomainService\mode().

81  : ItemManager
82  {
83  // @todo get rid of $DIC/request call here -> move to gui
84  global $DIC;
85 
86  return new ItemManager(
87  $container,
88  $this->item_repo,
89  $this->mode($container),
90  $DIC->container()->internal()->gui()->standardRequest()
91  );
92  }
$container
Definition: wac.php:36
mode(\ilContainer $container)
Controls admin/content view state Note: The node manager currently holds "state". ...
global $DIC
Definition: shib_login.php:26
+ Here is the call graph for this function:

◆ itemSetFlat()

ILIAS\UI\Component\Legacy\Content\DomainService::itemSetFlat ( int  $ref_id,
?\ilContainerUserFilter  $user_filter,
bool  $force_session_order_by_date = true 
)

Manages set of conatiner items (flat version)

Definition at line 116 of file class.DomainService.php.

References $ref_id, and ILIAS\UI\Component\Legacy\Content\ItemSetManager\FLAT.

120  : ItemSetManager {
121  if (!isset(self::$flat_item_set_managers[$ref_id])) {
122  self::$flat_item_set_managers[$ref_id] = new ItemSetManager(
123  $this->domain_service,
125  $ref_id,
126  $user_filter,
127  0,
128  false,
129  $force_session_order_by_date
130  );
131  }
132  return self::$flat_item_set_managers[$ref_id];
133  }
$ref_id
Definition: ltiauth.php:65

◆ itemSetSingle()

ILIAS\UI\Component\Legacy\Content\DomainService::itemSetSingle ( int  $ref_id,
int  $single_ref_id 
)

Manages set of conatiner items (single item version)

Definition at line 156 of file class.DomainService.php.

References null, and ILIAS\UI\Component\Legacy\Content\ItemSetManager\SINGLE.

156  : ItemSetManager
157  {
158  return new ItemSetManager(
159  $this->domain_service,
161  $ref_id,
162  null,
163  $single_ref_id
164  );
165  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
$ref_id
Definition: ltiauth.php:65

◆ itemSetTree()

ILIAS\UI\Component\Legacy\Content\DomainService::itemSetTree ( int  $ref_id,
?\ilContainerUserFilter  $user_filter 
)

Manages set of conatiner items (flat version)

Definition at line 138 of file class.DomainService.php.

References $ref_id, and ILIAS\UI\Component\Legacy\Content\ItemSetManager\TREE.

141  : ItemSetManager {
142  if (!isset(self::$tree_item_set_managers[$ref_id])) {
143  self::$tree_item_set_managers[$ref_id] = new ItemSetManager(
144  $this->domain_service,
146  $ref_id,
147  $user_filter
148  );
149  }
150  return self::$tree_item_set_managers[$ref_id];
151  }
$ref_id
Definition: ltiauth.php:65

◆ mode()

ILIAS\UI\Component\Legacy\Content\DomainService::mode ( \ilContainer  $container)

Controls admin/content view state Note: The node manager currently holds "state".

E.g. the ilContainerGUI class sets e.g. the ordering mode early in the request. Thus internal manager array is not only caching for performance but also serves a singleton approach. This may be refactored in the future.

Definition at line 221 of file class.DomainService.php.

References ilObject\getId().

Referenced by ILIAS\UI\Component\Legacy\Content\DomainService\items().

221  : ModeManager
222  {
223  if (!isset(self::$mode_managers[$container->getId()])) {
224  self::$mode_managers[$container->getId()] = new ModeManager(
225  $container,
226  $this->mode_repo,
227  $this->repo_clipboard,
228  $this->domain_service->user()->getId()
229  );
230  }
231  return self::$mode_managers[$container->getId()];
232  }
$container
Definition: wac.php:36
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ view()

ILIAS\UI\Component\Legacy\Content\DomainService::view ( \ilContainer  $container)

Definition at line 167 of file class.DomainService.php.

References $container, ILIAS\UI\Component\Legacy\Content\DomainService\$domain_service, ilContainer\filteredSubtree(), ilContainer\getViewMode(), and ilContainer\VIEW_SIMPLE.

167  : ViewManager
168  {
169  $view_mode = $container->getViewMode();
170  if ($container->filteredSubtree()) {
171  $view_mode = \ilContainer::VIEW_SIMPLE;
172  }
173  switch ($view_mode) {
174  case \ilContainer::VIEW_SIMPLE:
175  $container_view = new SimpleViewManager(
176  $this->data_service->content(),
178  $container
179  );
180  break;
181 
182  case \ilContainer::VIEW_OBJECTIVE:
183  $container_view = new ObjectiveViewManager(
184  $this->data_service->content(),
186  $container
187  );
188  break;
189 
190  // all items in one block
191  case \ilContainer::VIEW_SESSIONS:
192  case \ilCourseConstants::IL_CRS_VIEW_TIMING: // not nice this workaround
193  $container_view = new SessionsViewManager(
194  $this->data_service->content(),
196  $container
197  );
198  break;
199 
200  // all items in one block
201  case \ilContainer::VIEW_BY_TYPE:
202  default:
203  $container_view = new ByTypeViewManager(
204  $this->data_service->content(),
206  $container
207  );
208  break;
209  }
210 
211  return $container_view;
212  }
$container
Definition: wac.php:36
+ Here is the call graph for this function:

Field Documentation

◆ $copage_resources

ILIAS COPage PC Resources ResourcesManager ILIAS\UI\Component\Legacy\Content\DomainService::$copage_resources
protected

◆ $data_service

InternalDataService ILIAS\UI\Component\Legacy\Content\DomainService::$data_service
protected

◆ $domain_service

◆ $flat_item_set_managers

array ILIAS\UI\Component\Legacy\Content\DomainService::$flat_item_set_managers = []
staticprotected

Definition at line 50 of file class.DomainService.php.

◆ $item_repo

ItemSessionRepository ILIAS\UI\Component\Legacy\Content\DomainService::$item_repo
protected

Definition at line 40 of file class.DomainService.php.

◆ $mode_managers

array ILIAS\UI\Component\Legacy\Content\DomainService::$mode_managers = []
staticprotected

Definition at line 45 of file class.DomainService.php.

◆ $mode_repo

ModeSessionRepository ILIAS\UI\Component\Legacy\Content\DomainService::$mode_repo
protected

Definition at line 41 of file class.DomainService.php.

◆ $repo_clipboard

ILIAS Repository Clipboard ClipboardManager ILIAS\UI\Component\Legacy\Content\DomainService::$repo_clipboard
protected

Definition at line 35 of file class.DomainService.php.

◆ $repo_service

InternalRepoService ILIAS\UI\Component\Legacy\Content\DomainService::$repo_service
protected

◆ $tree_item_set_managers

array ILIAS\UI\Component\Legacy\Content\DomainService::$tree_item_set_managers = []
staticprotected

Definition at line 55 of file class.DomainService.php.


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