You are here

protected function FileDownloadLinkMedia::getTokenWarningMarkup in File Download Link 8

A helper function for the config form.

Return value

string An example of what token could do for you.

1 call to FileDownloadLinkMedia::getTokenWarningMarkup()
FileDownloadLinkMedia::settingsForm in modules/file_downoad_link_media/src/Plugin/Field/FieldFormatter/FileDownloadLinkMedia.php
Returns a form to configure settings for the formatter.

File

modules/file_downoad_link_media/src/Plugin/Field/FieldFormatter/FileDownloadLinkMedia.php, line 244

Class

FileDownloadLinkMedia
Plugin implementation of the 'file_download_link_media' formatter.

Namespace

Drupal\file_download_link_media\Plugin\Field\FieldFormatter

Code

protected function getTokenWarningMarkup() {
  return $this
    ->t('<p>Enable the <a href="https://www.drupal.org/project/token" target="_blank">token module</a> to allow more flexible link text. For example, you would be able show the media name followed by the file size like this<code>@example</code></p>', [
    '@example' => $this
      ->getExampleToken(),
  ]);
}