ILIAS  trunk Revision v12.0_alpha-1221-g4e438232683
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 33 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 35 of file class.TimelineManager.php.

39 {
40 }

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 42 of file class.TimelineManager.php.

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

References $ref_id.

◆ getNewsItem()

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

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

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

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