ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\News\Timeline\TimelineManager Class Reference
+ Collaboration diagram for ILIAS\News\Timeline\TimelineManager:

Public Member Functions

 __construct (InternalDataService $data, InternalRepoService $repo, 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)
 

Protected Attributes

InternalRepoService $repo
 
InternalDataService $data
 
InternalDomainService $domain
 

Detailed Description

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

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

Constructor & Destructor Documentation

◆ __construct()

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

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

40 {
41 $this->data = $data;
42 $this->domain = $domain;
43 }

References ILIAS\News\Timeline\TimelineManager\$data, and ILIAS\News\Timeline\TimelineManager\$domain.

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

53 : array {
54 $user = $this->domain->user();
55 $news_item = new \ilNewsItem();
56 $news_item->setContextObjId($context_obj_id);
57 $news_item->setContextObjType($context_type);
58
59 if ($ref_id > 0) {
60 $news_data = $news_item->getNewsForRefId(
61 $ref_id,
62 false,
63 false,
64 $period,
65 true,
66 false,
67 !$include_auto_entries,
68 false,
69 null,
70 $items_per_load,
71 $excluded
72 );
73 } else {
74 $cnt = [];
76 $user->getId(),
77 false,
78 true,
79 $period,
80 $cnt,
81 !$include_auto_entries,
82 $excluded,
83 $items_per_load
84 );
85 }
86 return $news_data;
87 }
static _getNewsItemsOfUser(int $a_user_id, bool $a_only_public=false, bool $a_prevent_aggregation=false, int $a_per=0, array &$a_cnt=[], bool $no_auto_generated=false, array $excluded=[], int $a_limit=0)
Get all news items for a user.
$ref_id
Definition: ltiauth.php:66

Field Documentation

◆ $data

InternalDataService ILIAS\News\Timeline\TimelineManager::$data
protected

◆ $domain

InternalDomainService ILIAS\News\Timeline\TimelineManager::$domain
protected

◆ $repo

InternalRepoService ILIAS\News\Timeline\TimelineManager::$repo
protected

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


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