216 public function register(array $data, array $additionalOptions = [],
int $userId = 0,
string $appCode =
'',
bool $byAgent =
true): array
218 $result = static::checkRegister($data);
219 if (!empty($result[
'error']))
225 $file = CRestUtil::saveFile(base64_encode(Json::encode($data)));
226 $file[
'MODULE_ID'] = static::MODULE_ID;
229 'configuration/' . static::ACTION
253 if (!empty($appCode))
270 static::class .
'::runAgent(' .
$processId .
');',
276 ConvertTimeStamp(time() + CTimeZone::GetOffset() + 60,
'FULL')
286 if (!$result[
'processId'])
288 $result[
'error'] = static::ERROR_PROCESS_DID_NOT_CREATE;
304 if (isset($data[self::PROPERTY_STRUCTURE]) && is_array($data[self::PROPERTY_STRUCTURE]))
306 foreach ($data[self::PROPERTY_STRUCTURE] as $type => $item)
312 if (is_array($data[self::PROPERTY_STRUCTURE][$type]))
315 foreach ($data[self::PROPERTY_STRUCTURE][$type] as $value)
317 if (is_string($value))
319 $path = array_filter(explode(
'/', $value));
320 $list[end($path)] = $value;