TaskFieldHandler::prepareTitle

  1. Bitrix24 API (v. 23.675.0)
  2. tasks
  3. TaskFieldHandler
  4. prepareTitle
  • Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/control/handler/taskfieldhandler.php
  • Класс: BitrixTasksControlHandlerTaskFieldHandler
  • Вызов: TaskFieldHandler::prepareTitle
public function prepareTitle(): self
{
	if (
		$this->taskId
		&& !array_key_exists('TITLE', $this->fields)
	)
	{
		return $this;
	}

	$title = trim((string) $this->fields['TITLE']);
	if ($title === '')
	{
		throw new TaskFieldValidateException(Loc::getMessage('TASKS_BAD_TITLE'));
	}

	$title = Emoji::encode(mb_substr($title, 0, 250));
	$this->fields['TITLE'] = $title;

	return $this;
}

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