1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
OwnerBuilder.php
См. документацию.
1<?php
2
4
6
8{
9 public function __construct(private int $userId)
10 {}
11
12 public function build(): Owner
13 {
14 $owner = new Owner($this->userId);
15 $user = \CCalendar::GetUser($this->userId);
16 if (!$user)
17 {
18 return $owner;
19 }
20
21 $owner
22 ->setName(\CUser::FormatName(\CSite::GetNameFormat(), $user))
23 ->setAvatar($this->prepareAvatar($user))
24 ->setLink('/company/personal/user/'.$this->userId.'/')
25 ;
26
27 return $owner;
28 }
29
30 private function prepareAvatar(array $user): ?string
31 {
32 $avatarSrc = \CCalendar::GetUserAvatarSrc($user);
33
34 if ($avatarSrc === '/bitrix/images/1.gif')
35 {
36 $avatarSrc = null;
37 }
38
39 return $avatarSrc;
40 }
41}
if(!is_object($USER)||! $USER->IsAuthorized()) $userId
Определения check_mail.php:18
__construct(private int $userId)
Определения OwnerBuilder.php:9
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$user
Определения mysql_to_pgsql.php:33