ILIAS  trunk Revision v12.0_alpha-1227-g7ff6d300864
class.InternalDomainService.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace ILIAS\News;
22
29
34{
35 use GlobalDICDomainServices;
36
37 public function __construct(
39 protected InternalRepoService $repo_service,
40 protected InternalDataService $data_service
41 ) {
42 $this->initDomainServices($DIC);
43 }
44
45 public function resolver(): UserContextResolver
46 {
47 return new UserContextResolver(
48 new \ilFavouritesDBRepository($this->DIC->database(), $this->repositoryTree()),
49 $this->access(),
50 $this->repositoryTree(),
51 $this->repo_service->cache()
52 );
53 }
54
56 {
57 return new NewsCollectionService(
58 $this->repo_service->news(),
59 $this->repo_service->cache(),
60 $this->resolver(),
61 $this->objectDataCache(),
62 $this->DIC->rbac()->system()
63 );
64 }
65
67 {
68 return new DashboardNewsManager(
69 $this->data_service,
70 $this->repo_service,
71 $this
72 );
73 }
74
75 public function timeline(): TimelineManager
76 {
77 return new TimelineManager(
78 $this->data_service,
79 $this->repo_service,
80 $this
81 );
82 }
83}
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:36
News Collection Service orchestrates all news-related operations and provides a high-level API for th...
User Context Resolver resolves which contexts a user can access for news operations.
Repository internal data service.
__construct(Container $DIC, protected InternalRepoService $repo_service, protected InternalDataService $data_service)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
initDomainServices(\ILIAS\DI\Container $DIC)
global $DIC
Definition: shib_login.php:26