You are here

protected function FilebrowserManager::folderPathDescription in Filebrowser 8.2

Same name and namespace in other branches
  1. 3.x src/FilebrowserManager.php \Drupal\filebrowser\FilebrowserManager::folderPathDescription()
1 call to FilebrowserManager::folderPathDescription()
FilebrowserManager::addFormExtraFields in src/FilebrowserManager.php
Adds form element to node type dir_listing or to filebrowser config settings form

File

src/FilebrowserManager.php, line 522

Class

FilebrowserManager

Namespace

Drupal\filebrowser

Code

protected function folderPathDescription() {
  $text = $this
    ->t('Uri of the directory: <strong>scheme://directory[/sub-directory]</strong><br>The schemes <strong>public://</strong>&nbsp;and&nbsp;<strong>private://</strong> are available by default.<br>');
  $array = [
    '@drupal-flysystem' => 'http://drupal.org/project/flysystem',
  ];
  if (\Drupal::hasService('flysystem_factory')) {
    $available_schemes = \Drupal::service('flysystem_factory')
      ->getSchemes();
    $extra = $this
      ->t('Schemes provided by <a href = "@drupal-flysystem">Flysystem module:</a><ul>', $array);
    foreach ($available_schemes as $scheme) {
      $extra .= '<li><strong>' . $scheme . '://</strong></li>';
    }
    $extra .= '</li>';
  }
  else {
    $extra = $this
      ->t('You can use remote storage (such as AWS s3) by installing the <a href = "@drupal-flysystem">Flysystem module</a>', $array);
  }
  return $text . $extra;
}