- Модуль: crm
- Путь к файлу: ~/bitrix/modules/crm/lib/Service/Timeline/Item/Activity/Document.php
- Класс: Bitrix\Crm\Service\Timeline\Item\Activity\Document
- Вызов: Document::getButtons
public function getButtons(): ?array
{
return [
'open' =>
(new Layout\Footer\Button(Loc::getMessage('CRM_COMMON_ACTION_OPEN'), Layout\Footer\Button::TYPE_PRIMARY))
->setAction($this->getOpenDocumentAction())
,
'copyPublicLink' =>
(new Layout\Footer\Button(Loc::getMessage('CRM_COMMON_ACTION_COPY_LINK'), Layout\Footer\Button::TYPE_SECONDARY))
->setAction(
$this->getUrlAction('Document:CopyPublicLink', 'publicUrl', $this->getPublicUrl()),
)
,
'sign' =>
(new Layout\Footer\Button(Loc::getMessage('CRM_COMMON_ACTION_SIGN'), Layout\Footer\Button::TYPE_SECONDARY))
->setAction(
//todo implement signing or hide this button
new Layout\Action\JsCode("alert('you are signing the document');")
)
,
];
}