Commit 869645a3 authored by Joop Sint Jago's avatar Joop Sint Jago
Browse files

Issue #3090114 by EnzoFr: Remove or complete the filebrowser stream wrapper

parent b503601c
Loading
Loading
Loading
Loading
+4 −4
Changes for filebrowser.services.yml: 4 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -44,10 +44,10 @@ services:
    arguments: ['@filebrowser.storage', '@filebrowser.common']
    tags:
      - { name: breadcrumb_builder, priority: 1005 }
  stream_wrapper.filebrowser:
    class: Drupal\filebrowser\FilebrowserStream\FilebrowserStream
    tags:
      - { name: stream_wrapper, scheme: filebrowser }
#  stream_wrapper.filebrowser:
#    class: Drupal\filebrowser\FilebrowserStream\FilebrowserStream
#    tags:
#      - { name: stream_wrapper, scheme: filebrowser }
  filebrowser.uninstall.validator:
    class: Drupal\filebrowser\FilebrowserUninstallValidator
    tags:
+0 −29
Changes for src/FilebrowserStream/FilebrowserStream.php: 0 added lines, 29 removed lines.
Original line number Diff line number Diff line
<?php

namespace Drupal\filebrowser\FilebrowserStream;

use Drupal\Core\StreamWrapper\PublicStream;

//todo: replace this when issue https://www.drupal.org/node/1308152 lands

class FilebrowserStream extends PublicStream{

  /**
   *   to sites/ in a Drupal installation. This allows you to inject the site
   * Returns the base path for filebrowser://.
   *
   *
   * @param \SplString $site_path
   *   (optional) The site.path service parameter, which is typically the path
   *   path using services from the caller. If omitted, this method will use the
   *   global service container or the kernel's default behavior to determine
   *   the site path.
   *
   * @return string
   *   The base path for public:// typically sites/default/files.
   */
  public static function basePath(\SplString $site_path = NULL) {
    return drupal_get_path("module", "filebrowser");
  }

}
 No newline at end of file