ILIAS  trunk Revision v12.0_alpha-1540-g00f839d5fa1
ILIAS\News\Timeline\TimelineManager Class Reference
+ Collaboration diagram for ILIAS\News\Timeline\TimelineManager:

Public Member Functions

 __construct (protected InternalDataService $data, protected InternalRepoService $repo, protected InternalDomainService $domain)
 
 getNewsData (int $ref_id, int $context_obj_id, string $context_type, int $period, bool $include_auto_entries, int $items_per_load, array $excluded)
 
 getNewsItem (int $news_id)
 

Detailed Description

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

Definition at line 34 of file class.TimelineManager.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\News\Timeline\TimelineManager::__construct ( protected InternalDataService  $data,
protected InternalRepoService  $repo,
protected InternalDomainService  $domain 
)

Definition at line 36 of file class.TimelineManager.php.

40 {
41 }

Member Function Documentation

◆ getNewsData()

ILIAS\News\Timeline\TimelineManager::getNewsData ( int  $ref_id,
int  $context_obj_id,
string  $context_type,
int  $period,
bool  $include_auto_entries,
int  $items_per_load,
array  $excluded 
)

Definition at line 43 of file class.TimelineManager.php.

51 : NewsCollection {
52 $criteria = new NewsCriteria(
53 period: $period,
54 limit: $items_per_load,
55 no_auto_generated: !$include_auto_entries,
56 excluded_news_ids: $excluded,
57 read_user_id: $this->domain->user()->getId()
58 );
59
60 if ($ref_id > 0) {
61 return $this->domain->collection()->getNewsForContext(
62 new NewsContext($ref_id, $context_obj_id, $context_type),
63 $criteria,
64 $this->domain->user()->getId()
65 );
66 } else {
67 return $this->domain->collection()->getNewsForUser(
68 $this->domain->user(),
69 $criteria
70 );
71 }
72 }
$ref_id
Definition: ltiauth.php:66

References $ref_id.

◆ getNewsItem()

ILIAS\News\Timeline\TimelineManager::getNewsItem ( int  $news_id)

Definition at line 74 of file class.TimelineManager.php.

74 : ?NewsItem
75 {
76 return $this->repo->news()->findById($news_id);
77 }

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