1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
author.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Socialnetwork\Integration\AI\User
;
4
5
class
Author
6
{
7
private
int
$userId;
8
private
array
$user;
9
10
public
function
__construct
(
int
$userId)
11
{
12
$this->userId = $userId;
13
$this->init();
14
}
15
16
public
function
getName
(): string
17
{
18
return
trim(
"{$this->user['NAME']} {$this->user['LAST_NAME']}"
);
19
}
20
21
public
function
getWorkPosition
(): string
22
{
23
return
(
string
)$this->user[
'WORK_POSITION'
];
24
}
25
26
public
function
toMeta
():
array
27
{
28
return
[
29
'author'
=> [
30
'name'
=> $this->
getName
(),
31
'work_position'
=> $this->
getWorkPosition
(),
32
],
33
];
34
}
35
36
private
function
init(): void
37
{
38
$this->user = \CUser::GetByID($this->userId)->Fetch();
39
}
40
}
Bitrix\Socialnetwork\Integration\AI\User\Author
Определения
author.php:6
Bitrix\Socialnetwork\Integration\AI\User\Author\toMeta
toMeta()
Определения
author.php:26
Bitrix\Socialnetwork\Integration\AI\User\Author\getName
getName()
Определения
author.php:16
Bitrix\Socialnetwork\Integration\AI\User\Author\getWorkPosition
getWorkPosition()
Определения
author.php:21
Bitrix\Socialnetwork\Integration\AI\User\Author\__construct
__construct(int $userId)
Определения
author.php:10
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
Bitrix\Socialnetwork\Integration\AI\User
Определения
author.php:3
bitrix
modules
socialnetwork
lib
integration
ai
user
author.php
Создано системой
1.14.0