/**
  * Get delete action, if this record is deletable
  *
  * @param File $record
  * @return FormAction
  */
 protected function getDeleteAction($record)
 {
     // Delete action
     if ($record && $record->isInDB() && $record->canDelete()) {
         $deleteText = _t('SilverStripe\\AssetAdmin\\Controller\\AssetAdmin.DELETE_BUTTON', 'Delete');
         return FormAction::create('delete', $deleteText)->setIcon('trash-bin');
     }
     return null;
 }
 /**
  * @param File $record
  * @return FormAction
  */
 protected function getInsertAction($record)
 {
     if ($record && $record->isInDB() && $record->canEdit()) {
         return FormAction::create('insert', _t('CMSMain.INSERT', 'Insert file'))->setSchemaData(['data' => ['buttonStyle' => 'primary']]);
     }
     return null;
 }
 /**
  * Given a file return the CMS link to edit it
  *
  * @param File $file
  * @return string
  */
 public function getFileEditLink($file)
 {
     if (!$file || !$file->isInDB()) {
         return null;
     }
     return Controller::join_links($this->Link('show'), $file->ParentID, 'edit', $file->ID);
 }