Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
base.php
1<?php
2
4
11abstract class Base
12{
13 protected $id;
14 protected $sort;
15 protected $active;
16 protected $config;
17
22 public function __construct(array $fields = array())
23 {
24 $this->id = isset($fields['ID']) ? intval($fields['ID']) : 0;
25 $this->sort = isset($fields['SORT']) ? intval($fields['SORT']) : 100;
26 $this->active = isset($fields['ACTIVE']) && $fields['ACTIVE'] == 'Y' ? 'Y' : 'N';
27 $this->config = isset($fields['CONFIG']) && is_array($fields['CONFIG']) ? $fields['CONFIG'] : array();
28 }
29
33 public function getId()
34 {
35 return $this->id;
36 }
37
41 public function getSort()
42 {
43 return $this->sort;
44 }
45
49 public function isActive()
50 {
51 return $this->active == 'Y';
52 }
53
57 abstract public function getTitle();
58
62 abstract public function getDescription();
63
69 abstract public function getDataResult($ip, $lang = '');
70
75 public function getSupportedLanguages()
76 {
77 return array();
78 }
79
84 public function isInstalled()
85 {
86 return true;
87 }
88
92 public function getConfigForAdmin()
93 {
94 return array();
95 }
96
101 public function createConfigField(array $postFields)
102 {
103 return array();
104 }
105
109 public function getProvidingData()
110 {
111 return new ProvidingData();
112 }
113}
__construct(array $fields=array())
Definition base.php:22
createConfigField(array $postFields)
Definition base.php:101