• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/Model/Dynamic/Item.php
  • Класс: Bitrix\Crm\Model\Dynamic\Item
  • Вызов: Item::resolveAssignedById
private function resolveAssignedById($assignedById)
{
	// multiple assigned, return as it is
	if (is_array($assignedById))
	{
		return $assignedById;
	}

	// in case multiple assigned is disabled, but there are serialized values that we put in the DB before disabling
	if (mb_strpos($assignedById, '[') === 0)
	{
		$deserializedValues = Json::decode($assignedById);

		$assignedById = array_shift($deserializedValues);
	}

	// since value is stored in string field, we have to typecast it manually
	// other entity types return int in similar methods, code don't expect to get a string
	return is_numeric($assignedById) ? (int)$assignedById : null;
}