You are here

public function CourseObjectAccessPluginManager::__construct in Course 8.3

Same name and namespace in other branches
  1. 8.2 src/Plugin/CourseObjectAccessPluginManager.php \Drupal\course\Plugin\CourseObjectAccessPluginManager::__construct()
  2. 3.x src/Plugin/CourseObjectAccessPluginManager.php \Drupal\course\Plugin\CourseObjectAccessPluginManager::__construct()

Constructs a new CourseObjectAccessManager object.

Parameters

Traversable $namespaces: An object that implements \Traversable which contains the root paths keyed by the corresponding namespace to look for plugin implementations.

CacheBackendInterface $cache_backend: Cache backend instance to use.

ModuleHandlerInterface $module_handler: The module handler to invoke the alter hook with.

Overrides DefaultPluginManager::__construct

File

src/Plugin/CourseObjectAccessPluginManager.php, line 27

Class

CourseObjectAccessPluginManager
Provides the Course object access plugin manager.

Namespace

Drupal\course\Plugin

Code

public function __construct(Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
  parent::__construct('Plugin/course', $namespaces, $module_handler, CourseObjectAccessInterface::class, CourseObjectAccess::class);
  $this
    ->alterInfo('course_object_access_info');
  $this
    ->setCacheBackend($cache_backend, 'course_object_access_plugins');
}