3 namespace Drupal\quickedit\Plugin;
5 use Drupal\Core\Cache\CacheBackendInterface;
6 use Drupal\Core\Extension\ModuleHandlerInterface;
7 use Drupal\Core\Plugin\DefaultPluginManager;
10 * Provides an in-place editor manager.
12 * The 'form' in-place editor must always be available.
14 * @see \Drupal\quickedit\Annotation\InPlaceEditor
15 * @see \Drupal\quickedit\Plugin\InPlaceEditorBase
16 * @see \Drupal\quickedit\Plugin\InPlaceEditorInterface
19 class InPlaceEditorManager extends DefaultPluginManager {
22 * Constructs a InPlaceEditorManager object.
24 * @param \Traversable $namespaces
25 * An object that implements \Traversable which contains the root paths
26 * keyed by the corresponding namespace to look for plugin implementations.
27 * @param \Drupal\Core\Cache\CacheBackendInterface $cache_backend
28 * Cache backend instance to use.
29 * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
30 * The module handler to invoke the alter hook with.
32 public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
33 parent::__construct('Plugin/InPlaceEditor', $namespaces, $module_handler, 'Drupal\quickedit\Plugin\InPlaceEditorInterface', 'Drupal\quickedit\Annotation\InPlaceEditor');
34 $this->alterInfo('quickedit_editor');
35 $this->setCacheBackend($cache_backend, 'quickedit:editor');