comparison core/modules/quickedit/src/Plugin/InPlaceEditorManager.php @ 0:c75dbcec494b

Initial commit from drush-created site
author Chris Cannam
date Thu, 05 Jul 2018 14:24:15 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:c75dbcec494b
1 <?php
2
3 namespace Drupal\quickedit\Plugin;
4
5 use Drupal\Core\Cache\CacheBackendInterface;
6 use Drupal\Core\Extension\ModuleHandlerInterface;
7 use Drupal\Core\Plugin\DefaultPluginManager;
8
9 /**
10 * Provides an in-place editor manager.
11 *
12 * The 'form' in-place editor must always be available.
13 *
14 * @see \Drupal\quickedit\Annotation\InPlaceEditor
15 * @see \Drupal\quickedit\Plugin\InPlaceEditorBase
16 * @see \Drupal\quickedit\Plugin\InPlaceEditorInterface
17 * @see plugin_api
18 */
19 class InPlaceEditorManager extends DefaultPluginManager {
20
21 /**
22 * Constructs a InPlaceEditorManager object.
23 *
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.
31 */
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');
36 }
37
38 }