• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/Service/Timeline/Item/Activity/OpenLine.php
  • Класс: Bitrix\Crm\Service\Timeline\Item\Activity\OpenLine
  • Вызов: OpenLine::getCompleteButton
protected function getCompleteButton(): ?ChangeStreamButton
{
	if (!$this->isScheduled())
	{
		return null;
	}

	$completeAction =  (new JsEvent('Openline:Complete'))
		->addActionParamInt('activityId', $this->getActivityId())
		->addActionParamInt('ownerTypeId', $this->getContext()->getEntityTypeId())
		->addActionParamInt('ownerId', $this->getContext()->getEntityId())
		->addActionParamString('ajaxAction', $this->getCompleteAction()->getAction())
		->setAnimation(Animation::disableItem()->setForever())
	;

	return (new ChangeStreamButton())
		->setTypeComplete()
		->setDisableIfReadonly()
		->setAction($completeAction)
	;
}