3namespace Bitrix\Im\V2\Chat\Param;
5use Bitrix\Im\Model\ChatParamTable;
6use Bitrix\Im\V2\ActiveRecord;
7use Bitrix\Im\V2\Common\ActiveRecordImplementation;
8use Bitrix\Im\V2\Common\RegistryEntryImplementation;
9use Bitrix\Im\V2\RegistryEntry;
13 use ActiveRecordImplementation;
14 use RegistryEntryImplementation;
30 self::TYPE_STRING_ARRAY,
42 public static function getDataClass(): string
44 return ChatParamTable::class;
52 if ($this->getRegistry())
54 unset($this->getRegistry()[$this->
getName()]);
107 if ($this->name !=
$name)
109 $this->markChanged();
118 return $this->type ?? self::TYPE_STRING;
125 case self::TYPE_INT_ARRAY:
126 $type = self::TYPE_INT;
129 case self::TYPE_STRING_ARRAY:
130 $type = self::TYPE_STRING;
132 if ($this->type !==
$type)
134 $this->markChanged();
148 case self::TYPE_BOOL:
149 if (is_string($this->value))
151 $this->value = $this->value ===
'Y';
155 case self::TYPE_STRING:
175 $this->value = (int)
$value;
178 case self::TYPE_BOOL:
181 $this->value =
$value ===
'Y';
185 $this->value = (bool)
$value;
189 case self::TYPE_STRING:
190 $this->value = (string)
$value;
197 if ($prevValue !== $this->value)
199 $this->markChanged();
207 return $this->value !==
null;
217 $this->jsonValue =
$value;
218 $this->markChanged();
235 protected static function mirrorDataEntityFields():
array
240 'field' =>
'paramId',
241 'get' =>
'getParamId',
242 'set' =>
'setParamId',
246 'set' =>
'setChatId',
247 'get' =>
'getChatId',
262 'saveFilter' =>
'saveValueFilter',
263 'loadFilter' =>
'loadValueFilter',
266 'field' =>
'jsonValue',
267 'set' =>
'setJsonValue',
268 'get' =>
'getJsonValue',
269 'saveFilter' =>
'saveJsonFilter',
270 'loadFilter' =>
'loadJsonFilter',
277 if ($this->type === self::TYPE_BOOL)
287 if ($this->type === self::TYPE_BOOL)
309 case self::TYPE_BOOL:
310 return $this->
getValue() ?
'Y' :
'N';
315 case self::TYPE_STRING:
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
setPrimaryId(int $primaryId)
setHidden(bool $isHidden)