ILIAS  trunk Revision v11.0_alpha-1811-gd2d5443e411
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\Repository\Profile\ProfileGUI Class Reference
+ Collaboration diagram for ILIAS\Repository\Profile\ProfileGUI:

Public Member Functions

 __construct (ProfileAdapter $profile, \ILIAS\UI\Factory $ui_factory)
 
 getAvatar (int $user_id)
 
 getPicturePath (int $user_id)
 
 getNamePresentation (int $user_id, bool $link_profile=false, string $back="", $force_first_last=false)
 

Protected Attributes

ProfileAdapter $profile
 
ILIAS UI Factory $ui_factory
 

Detailed Description

Definition at line 25 of file ProfileGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Repository\Profile\ProfileGUI::__construct ( ProfileAdapter  $profile,
\ILIAS\UI\Factory  $ui_factory 
)

Definition at line 30 of file ProfileGUI.php.

References ILIAS\Repository\Profile\ProfileGUI\$profile, ILIAS\Repository\Profile\ProfileGUI\$ui_factory, and ILIAS\Repository\profile().

33  {
34  $this->ui_factory = $ui_factory;
35  $this->profile = $profile;
36  }
+ Here is the call graph for this function:

Member Function Documentation

◆ getAvatar()

ILIAS\Repository\Profile\ProfileGUI::getAvatar ( int  $user_id)

Definition at line 38 of file ProfileGUI.php.

References ilObjUser\_getAvatar(), and ILIAS\Repository\profile().

38  : Avatar
39  {
40  if ($this->profile->exists($user_id)) {
42  } else {
43  $avatar = $this->ui_factory->symbol()->avatar()->letter($this->profile->getDeletedUserAvatarText());
44  }
45  return $avatar;
46  }
static _getAvatar(int $a_usr_id)
+ Here is the call graph for this function:

◆ getNamePresentation()

ILIAS\Repository\Profile\ProfileGUI::getNamePresentation ( int  $user_id,
bool  $link_profile = false,
string  $back = "",
  $force_first_last = false 
)

Definition at line 62 of file ProfileGUI.php.

References ilUserUtil\getNamePresentation(), and ILIAS\Repository\profile().

62  : string
63  {
64  if ($this->profile->exists($user_id)) {
65  $name = \ilUserUtil::getNamePresentation($user_id, false, $link_profile, $back, $force_first_last);
66  } else {
67  $name = $this->profile->getDeletedUserNamePresentation();
68  }
69  return $name;
70  }
static getNamePresentation( $a_user_id, bool $a_user_image=false, bool $a_profile_link=false, string $a_profile_back_link='', bool $a_force_first_lastname=false, bool $a_omit_login=false, bool $a_sortable=true, bool $a_return_data_array=false, $a_ctrl_path='ilpublicuserprofilegui')
Default behaviour is:
+ Here is the call graph for this function:

◆ getPicturePath()

ILIAS\Repository\Profile\ProfileGUI::getPicturePath ( int  $user_id)

Definition at line 48 of file ProfileGUI.php.

References $DIC, and ILIAS\Repository\profile().

48  : string
49  {
50  global $DIC;
51 
52  if ($this->profile->exists($user_id)) {
53  return \ilObjUser::_getPersonalPicturePath($user_id, "xsmall", true, true);
54  }
55  $fac = new \ilUserAvatarFactory($DIC);
56  $avatar = $fac->avatar("xsmall");
57  $avatar->setName(substr($this->profile->getDeletedUserAvatarText(), 0, 2));
58  $avatar->setUsrId($user_id);
59  return $avatar->getUrl();
60  }
global $DIC
Definition: shib_login.php:22
+ Here is the call graph for this function:

Field Documentation

◆ $profile

ProfileAdapter ILIAS\Repository\Profile\ProfileGUI::$profile
protected

Definition at line 27 of file ProfileGUI.php.

Referenced by ILIAS\Repository\Profile\ProfileGUI\__construct().

◆ $ui_factory

ILIAS UI Factory ILIAS\Repository\Profile\ProfileGUI::$ui_factory
protected

Definition at line 28 of file ProfileGUI.php.

Referenced by ILIAS\Repository\Profile\ProfileGUI\__construct().


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