protected function getFormActions()
 {
     $actions = parent::getFormActions();
     // Check if record is versionable
     $record = $this->getRecord();
     if (!$record || !$record->has_extension('Versioned')) {
         return $actions;
     }
     // Save & Publish action
     if ($record->canPublish()) {
         // "publish", as with "save", it supports an alternate state to show when action is needed.
         $publish = FormAction::create('doPublish', _t('VersionedGridFieldItemRequest.BUTTONPUBLISH', 'Publish'))->setUseButtonTag(true)->addExtraClass('ss-ui-action-constructive')->setAttribute('data-icon', 'accept');
         // Insert after save
         if ($actions->fieldByName('action_doSave')) {
             $actions->insertAfter('action_doSave', $publish);
         } else {
             $actions->push($publish);
         }
     }
     // Unpublish action
     $isPublished = $record->isPublished();
     if ($isPublished && $record->canUnpublish()) {
         $actions->push(FormAction::create('doUnpublish', _t('VersionedGridFieldItemRequest.BUTTONUNPUBLISH', 'Unpublish'))->setUseButtonTag(true)->setDescription(_t('VersionedGridFieldItemRequest.BUTTONUNPUBLISHDESC', 'Remove this record from the published site'))->addExtraClass('ss-ui-action-destructive'));
     }
     // Archive action
     if ($record->canArchive()) {
         // Replace "delete" action
         $actions->removeByName('action_doDelete');
         // "archive"
         $actions->push(FormAction::create('doArchive', _t('VersionedGridFieldItemRequest.ARCHIVE', 'Archive'))->setDescription(_t('VersionedGridFieldItemRequest.BUTTONARCHIVEDESC', 'Unpublish and send to archive'))->addExtraClass('delete ss-ui-action-destructive'));
     }
     return $actions;
 }