Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
baseprovider.php
1<?php
2
4
5abstract class BaseProvider implements ReturnsEditorFields
6{
7 public function getFields(): array
8 {
9 return [
10 'GUID' => $this->getGUID(),
11 'CONFIG_ID' => $this->getConfigId(),
12 'ENTITY_ID' => $this->getEntityId(),
13 'ENTITY_TYPE_NAME' => $this->getEntityTypeName(),
14 'ENTITY_FIELDS' => $this->getEntityFields(),
15 'ENTITY_CONFIG' => $this->getEntityConfig(),
16 'ENTITY_DATA' => $this->getEntityData(),
17 'ENTITY_CONTROLLERS' => $this->getEntityControllers(),
18 'READ_ONLY' => $this->isReadOnly(),
19 'ENTITY_CONFIG_EDITABLE' => $this->isEntityConfigEditable(),
20 'MODULE_ID' => $this->getModuleId(),
21 ];
22 }
23
24 abstract public function getGUID(): string;
25
26 public function getConfigId(): ?string
27 {
28 return null;
29 }
30
31 abstract public function getEntityId(): ?int;
32
33 abstract public function getEntityTypeName(): string;
34
35 abstract public function getEntityFields(): array;
36
37 abstract public function getEntityConfig(): array;
38
39 abstract public function getEntityData(): array;
40
41 public function getEntityControllers(): array
42 {
43 return [];
44 }
45
46 public function isReadOnly(): bool
47 {
48 return false;
49 }
50
51 public function isEntityConfigEditable(): bool
52 {
53 return true;
54 }
55
56 public function getModuleId(): ?string
57 {
58 return null;
59 }
60}