Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
department.php
1<?php
10
11
13
15{
16
17 public function getType(): string
18 {
19 return AccessCode::TYPE_DEPARTMENT;
20 }
21
22 public function getName(): string
23 {
24 if ($this->model)
25 {
26 return $this->model['NAME'];
27 }
28 return '';
29 }
30
31 public function getUrl(): string
32 {
33 return '/company/structure.php?set_filter_structure=Y&structure_UF_DEPARTMENT='. $this->getId();
34 }
35
36 public function getAvatar(int $width = 58, int $height = 58): ?string
37 {
38 return '';
39 }
40
41 protected function loadModel()
42 {
43 if (!$this->model)
44 {
45 $structure = \CIntranetUtils::GetStructure();
46 if (array_key_exists($this->getId(), $structure['DATA']))
47 {
48 $this->model = $structure['DATA'][$this->getId()];
49 }
50 }
51
52 return $this->model;
53 }
54}
getAvatar(int $width=58, int $height=58)