3namespace Bitrix\Im\V2\Message;
6use Bitrix\Im\Model\EO_MessageParam;
7use Bitrix\Im\Model\EO_MessageParam_Collection;
8use Bitrix\Im\Model\MessageParamTable;
9use Bitrix\Im\V2\Collection;
10use Bitrix\Im\V2\Result;
11use Bitrix\Im\V2\Service\Context;
12use Bitrix\Im\V2\RegistryEntry;
13use Bitrix\Im\V2\Common\RegistryEntryImplementation;
23 use RegistryEntryImplementation;
42 $result = parent::load($source);
45 foreach ($this as $param)
48 ->setName($param->getName())
49 ->setMessageId($param->getMessageId())
68 if (!is_array($values))
79 $values = array_map(
'intVal', $values);
83 $values = array_map(
'strVal', $values);
86 foreach ($this as $param)
88 if (!$param->isDeleted() && in_array($param->getValue(), $values,
true))
90 $inx = array_search($param->getValue(), $values,
true);
105 foreach ($values as $value)
123 if (isset(
$type[
'default']))
125 $value =
$type[
'default'];
136 return $this->
count() > 0;
145 foreach ($this as $param)
147 if ($param->isDeleted())
154 $values[] = (int)$param->getValue();
158 $values[] = (string)$param->getValue();
162 $values[] = $param->getValue();
178 $value = (int)$value;
182 $value = (string)$value;
185 foreach ($this as $param)
187 if ($param->getValue() === $value)
205 if ($param->getPrimaryId())
207 $param->setRegistry($this);
227 if (!is_array($values))
234 $values = array_map(
'intVal', $values);
238 $values = array_map(
'strval', $values);
241 foreach ($this as $param)
243 if (in_array($param->getValue(), $values,
true))
253 foreach ($this as $param)
279 return array_map(
'strval', $this->
getValue());
304 foreach ($this as $value)
306 $value->setMessageId($this->messageId);
323 if ($this->name =
$name)
329 foreach ($this as $param)
331 $param->setName($this->name);
344 if ($this->type !=
$type)
349 foreach ($this as $param)
377 if (!empty($this->name))
406 $this->markedDrop =
false;
426 $this->markedDrop =
true;
436 if ($this->markedDrop)
441 foreach ($this as $param)
443 if (!$param->isDeleted())
460 $query = MessageParamTable::query()
470 return new static(
$query->fetchCollection());
477 foreach ($this as
$key => $param)
479 $this[
$key] = clone $param;
static find(array $filter, array $order, ?int $limit=null, ?Context $context=null)
static getCollectionElementClass()
setMessageId(int $messageId)
markChanged(?bool $state=null)
static getType(string $paramName)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
setRegistry(Registry $registry)
if(empty($signedUserToken)) $key