ILIAS  release_8 Revision v8.23
class.ilUsersGalleryUserImpl.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
22 {
24  protected string $public_name;
25  protected string $sortable_public_name;
26 
27  public function __construct(ilObjUser $aggregated_user, string $public_name, string $sortable_public_name)
28  {
29  $this->aggregated_user = $aggregated_user;
30  $this->public_name = $public_name;
31  $this->sortable_public_name = $sortable_public_name;
32  }
33 
34  public function hasPublicProfile(): bool
35  {
36  global $DIC;
37 
38  return (
39  (!$DIC->user()->isAnonymous() && $this->aggregated_user->getPref('public_profile') === 'y') ||
40  $this->aggregated_user->getPref('public_profile') === 'g'
41  );
42  }
43 
44  public function getPublicName(): string
45  {
46  return $this->public_name;
47  }
48 
49  public function getSortablePublicName(): string
50  {
52  }
53 
54  public function getAggregatedUser(): ilObjUser
55  {
57  }
58 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: feed.php:28
__construct(ilObjUser $aggregated_user, string $public_name, string $sortable_public_name)