/**
  * Update the UI to reflect published state
  * @return void
  */
 public function transformToButton()
 {
     parent::transformToButton();
     if ($this->gridFieldRequest->recordIsPublished()) {
         $this->setTitle(_t('SiteTree.BUTTONPUBLISHED', 'Published'));
     }
     if ($this->gridFieldRequest->record->stagesDiffer('Stage', 'Live') && $this->gridFieldRequest->recordIsDeletedFromStage()) {
         $this->addExtraClass('ss-ui-alternate');
     }
     return $this;
 }
 /**
  * Adds the appropriate icon and style
  * @return FormAction
  */
 public function transformToButton()
 {
     return parent::transformToButton()->addExtraClass('ss-ui-action-constructive')->setAttribute('data-icon', 'accept');
 }