ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.TimelineManager.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
26
31{
35
36 public function __construct(
40 ) {
41 $this->data = $data;
42 $this->domain = $domain;
43 }
44
45 public function getNewsData(
46 int $ref_id,
47 int $context_obj_id,
48 string $context_type,
49 int $period,
50 bool $include_auto_entries,
51 int $items_per_load,
52 array $excluded
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 }
88}
Repository internal data service.
getNewsData(int $ref_id, int $context_obj_id, string $context_type, int $period, bool $include_auto_entries, int $items_per_load, array $excluded)
__construct(InternalDataService $data, InternalRepoService $repo, InternalDomainService $domain)
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