3declare(strict_types=1);
35 protected \ILIAS\HTTP\GlobalHttpState
$http;
43 $this->
ctrl = $DIC->ctrl();
44 $this->tpl =
$DIC->ui()->mainTemplate();
45 $this->
lng = $DIC->language();
46 $this->
user = $DIC->user();
47 $this->rbacsystem =
$DIC->rbac()->system();
48 $this->factory =
$DIC->ui()->factory();
49 $this->renderer =
$DIC->ui()->renderer();
50 $this->
http = $DIC->http();
58 $next_class = $this->
ctrl->getNextClass();
59 $cmd = $this->
ctrl->getCmd(
'view');
61 switch (strtolower($next_class)) {
62 case strtolower(ilPublicUserProfileGUI::class):
64 $this->
http->wrapper()->query()->retrieve(
66 $this->refinery->kindlyTo()->int()
69 $profile_gui->setBackUrl($this->
ctrl->getLinkTarget($this,
'view'));
70 $this->
ctrl->forwardCommand($profile_gui);
83 protected function view(): void
85 $template = $this->
populateTemplate($this->collection_provider->getGroupedCollections());
86 $this->tpl->setContent($template->get());
95 $contact_btn_html =
"";
98 !$this->
user->isAnonymous() &&
107 $list_html = $ua_gui->renderDropDown(
$user->
getId());
109 if ($contact_btn_html || $list_html) {
110 $sections[] = $this->factory->legacy(
111 "<div style='float:left; margin-bottom:5px;'>" . $contact_btn_html .
"</div><div class='button-container'> " . $list_html .
"</div>"
123 $tpl =
new ilTemplate(
'tpl.users_gallery.html',
true,
true,
'Services/User');
126 $panel->setBody($this->
lng->txt(
'no_gallery_users_available'));
127 $tpl->
setVariable(
'NO_ENTRIES_HTML', json_encode(
$panel->getHTML(), JSON_THROW_ON_ERROR));
129 $groups_with_users = array_filter($gallery_groups,
static function (
ilUsersGalleryGroup $group):
bool {
130 return count($group) > 0;
132 $groups_with_highlight = array_filter($groups_with_users,
static function (
ilUsersGalleryGroup $group):
bool {
136 if (0 === count($groups_with_users)) {
142 $panel->setBody($this->
lng->txt(
'no_gallery_users_available'));
143 $tpl->
setVariable(
'NO_ENTRIES_HTML', json_encode(
$panel->getHTML(), JSON_THROW_ON_ERROR));
147 foreach ($gallery_groups as $group) {
150 foreach ($group as
$user) {
152 $avatar = $this->factory->image()->standard(
159 if (count($groups_with_highlight) > 0) {
163 $sections[] = $this->factory->listing()->descriptive(
165 $this->
lng->txt(
"username") => $user->getAggregatedUser()->getLogin(),
166 $this->lng->txt(
"crs_contact_responsibility") => $group->
getLabel()
173 $this->
ctrl->setParameterByClass(
174 ilPublicUserProfileGUI::class,
178 $public_profile_url = $this->
ctrl->getLinkTargetByClass(ilPublicUserProfileGUI::class,
'getHTML');
180 $avatar = $avatar->withAction($public_profile_url);
181 $card = $card->withTitleAction($public_profile_url);
184 $card = $card->withImage($avatar)->withSections($sections);
190 $tpl->
setVariable(
'GALLERY_HTML', $this->renderer->render($this->factory->deck($cards)));
192 if ($this->collection_provider->hasRemovableUsers()) {
static getInstanceByGlobalUser()
Class ilCtrl provides processing control methods.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
hasPublicProfile()
returns true if public is profile, false otherwise
getPersonalPicturePath(string $a_size="small", bool $a_force_pic=false)
getPublicName()
returns firstname lastname and login if profile is public, login otherwise
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
class ilRbacSystem system function like checkAccess, addActiveRole ... Supporting system functions ar...
special template class to simplify handling of ITX/PEAR
static getInstance(ilUserActionContext $a_user_action_context, ilGlobalTemplateInterface $a_global_tpl, int $a_current_user_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ILIAS UI Renderer $renderer
ilGlobalTemplateInterface $tpl
populateTemplate(array $gallery_groups)
ILIAS Refinery Factory $refinery
ilUsersGalleryCollectionProvider $collection_provider
ILIAS HTTP GlobalHttpState $http
addActionSection(ilObjUser $user, array &$sections)
ILIAS UI Factory $factory
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...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
if(isset($_FILES['img_file']) &&is_array($_FILES['img_file'])) $panel
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
touchBlock(string $block)
overwrites ITX::touchBlock.
setVariable(string $variable, $value='')
Sets the given variable to the given value.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static http()
Fetches the global http state from ILIAS.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc