should::mergeData

  1. Bitrix24 API (v. 23.675.0)
  2. tasks
  3. should
  4. mergeData
  • Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/manager/task.php
  • Класс: Bitrix\Tasks\Manager\should
  • Вызов: should::mergeData
static function mergeData($primary = array(), $secondary = array())
{
	if (is_array($secondary) && is_array($primary))
	{
		foreach ($secondary as $k => $v)
		{
			if (!array_key_exists($k, $primary) || $k == static::ACT_KEY) // force rights merging
			{
				$primary[ $k ] = $secondary[ $k ];
			}
			elseif ($seName = static::checkIsSubEntityKey($k))
			{
				$fName = __NAMESPACE__ . '\\Task\\' . $seName . '::mergeData';
				if (is_callable($fName))
				{
					$primary[ $k ] = call_user_func_array($fName, array($primary[ $k ], $secondary[ $k ]));
				}
			}
		}
	}

	return $primary;
}

Добавить комментарий