19 declare(strict_types=1);
34 $this->
access = $DIC->access();
38 public function getItems(array $object_type_white_list = []): array
40 $short_desc = $this->
settings->get(
'rep_shorten_description');
41 $short_desc_max_length = (
int) $this->
settings->get(
'rep_shorten_description_length');
43 $favourites = $this->fav_manager->getFavouritesOfUser(
44 $this->actor->getId(),
45 count($object_type_white_list) > 0 ? $object_type_white_list :
null 47 $access_granted_favourites = [];
48 foreach ($favourites as $idx => $favourite) {
49 if (!$this->
access->checkAccess(
'visible',
'', $favourite[
'ref_id'])) {
53 if ($short_desc && $short_desc_max_length !== 0) {
57 $access_granted_favourites[$idx] = $favourite;
59 return $access_granted_favourites;
__construct(ilObjUser $actor)
Manages favourites, currently the interface for other components, needs discussion.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getItems(array $object_type_white_list=[])
static shortenTextExtended(string $a_str, int $a_len, bool $a_dots=false, bool $a_next_blank=false, bool $a_keep_extension=false)
ilFavouritesManager $fav_manager