LearningPathContentTypesManager.php in Opigno Learning path 8
File
src/LearningPathContentTypesManager.php
View source
<?php
namespace Drupal\opigno_learning_path;
use Drupal\Core\Plugin\DefaultPluginManager;
use Drupal\Core\Cache\CacheBackendInterface;
use Drupal\Core\Extension\ModuleHandlerInterface;
class LearningPathContentTypesManager extends DefaultPluginManager {
public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
parent::__construct('Plugin/LearningPathContentType', $namespaces, $module_handler, 'Drupal\\opigno_learning_path\\ContentTypeInterface', 'Drupal\\opigno_learning_path\\Annotation\\LearningPathContentType');
$this
->alterInfo('learning_path_content_type_alter');
$this
->setCacheBackend($cache_backend, 'learning_path_content_types');
}
public function createInstance($plugin_id, array $configuration = []) {
return parent::createInstance($plugin_id, $configuration);
}
}