...Человеческий поиск в разработке...
- Модуль: tasks
- Путь к файлу: ~/bitrix/modules/tasks/lib/internals/taskobject.php
- Класс: BitrixTasksInternalsTaskObject
- Вызов: TaskObject::wakeUpObject
static function wakeUpObject($data): TaskObject { if (!is_array($data)) { return parent::wakeUp($data); } $fields = TaskTable::getEntity()->getFields(); $wakeUpData = []; $customData = []; foreach ($data as $field => $value) { if (array_key_exists($field, $fields)) { if ( $fields[$field] instanceof DateTimeField && is_numeric($value) ) { $wakeUpData[$field] = DateTime::createFromTimestampGmt($value); } else { $wakeUpData[$field] = $value; } } else { $customData[$field] = $value; } } $object = parent::wakeUp($wakeUpData); foreach ($customData as $field => $value) { $object->customData->set($field, $value); } return $object; }