• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/internals/task/placeholder/taskmixer.php
  • Класс: BitrixTasksInternalsTaskPlaceholderTaskMixer
  • Вызов: TaskMixer::getReplacedData
public function getReplacedData(): array
{
	if (
		empty($this->description)
		|| empty($this->placeholders)
	)
	{
		return $this->taskData;
	}

	$placeholderValues = [];
	foreach ($this->placeholders as $placeholderName => $placeholderValue)
	{
		try
		{
			$placeholder = PlaceholderFactory::create($placeholderName, $placeholderValue);
			$placeholderValues[$placeholderName] = $placeholder->toString();
		}
		catch (PlaceholderException $exception)
		{
			$this->errors->setError(new Error($exception->getMessage(), $placeholderName));
			continue;
		}
	}

	$this->description = str_replace(
		array_keys($placeholderValues),
		array_values($placeholderValues),
		$this->description
	);

	$this->taskData['DESCRIPTION'] = $this->description;

	return $this->taskData;
}