DashboardManager.php in Dashboards with Layout Builder 8
File
src/Plugin/DashboardManager.php
View source
<?php
namespace Drupal\dashboards\Plugin;
use Drupal\Core\Plugin\DefaultPluginManager;
use Drupal\Core\Cache\CacheBackendInterface;
use Drupal\Core\Extension\ModuleHandlerInterface;
class DashboardManager extends DefaultPluginManager {
public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
parent::__construct('Plugin/Dashboard', $namespaces, $module_handler, 'Drupal\\dashboards\\Plugin\\DashboardInterface', 'Drupal\\dashboards\\Annotation\\Dashboard');
$this
->alterInfo('dashboards_dashboard_info');
$this
->setCacheBackend($cache_backend, 'dashboards_dashboard_plugins');
}
}