• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/controller/timeline/note.php
  • Класс: Bitrix\Crm\Controller\Timeline\Note
  • Вызов: Note::getAction
public function getAction(int $itemId, int $itemType, int $ownerTypeId, int $ownerId): ?array
{
	if (!$this->checkPermissions($itemId, $itemType, $ownerTypeId, $ownerId))
	{
		return null;
	}

	$note = $this->findNote($itemId, $itemType);
	if (!$note)
	{
		$this->addError(ErrorCode::getNotFoundError());

		return null;
	}

	return [
		'text' => $note->getText(),
		'createdById' => $note->getCreatedById(),
		'createdTime' => $this->formatDateTime($note->getCreatedTime()),
		'updatedById' => $note->getUpdatedById(),
		'updatedTime' => $this->formatDateTime($note->getUpdatedTime()),
	];
}