annotate core/modules/quickedit/src/Plugin/InPlaceEditorManager.php @ 19:fa3358dc1485 tip

Add ndrum files
author Chris Cannam
date Wed, 28 Aug 2019 13:14:47 +0100
parents 4c8ae668cc8c
children
rev   line source
Chris@0 1 <?php
Chris@0 2
Chris@0 3 namespace Drupal\quickedit\Plugin;
Chris@0 4
Chris@0 5 use Drupal\Core\Cache\CacheBackendInterface;
Chris@0 6 use Drupal\Core\Extension\ModuleHandlerInterface;
Chris@0 7 use Drupal\Core\Plugin\DefaultPluginManager;
Chris@0 8
Chris@0 9 /**
Chris@0 10 * Provides an in-place editor manager.
Chris@0 11 *
Chris@0 12 * The 'form' in-place editor must always be available.
Chris@0 13 *
Chris@0 14 * @see \Drupal\quickedit\Annotation\InPlaceEditor
Chris@0 15 * @see \Drupal\quickedit\Plugin\InPlaceEditorBase
Chris@0 16 * @see \Drupal\quickedit\Plugin\InPlaceEditorInterface
Chris@0 17 * @see plugin_api
Chris@0 18 */
Chris@0 19 class InPlaceEditorManager extends DefaultPluginManager {
Chris@0 20
Chris@0 21 /**
Chris@0 22 * Constructs a InPlaceEditorManager object.
Chris@0 23 *
Chris@0 24 * @param \Traversable $namespaces
Chris@0 25 * An object that implements \Traversable which contains the root paths
Chris@0 26 * keyed by the corresponding namespace to look for plugin implementations.
Chris@0 27 * @param \Drupal\Core\Cache\CacheBackendInterface $cache_backend
Chris@0 28 * Cache backend instance to use.
Chris@0 29 * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
Chris@0 30 * The module handler to invoke the alter hook with.
Chris@0 31 */
Chris@0 32 public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
Chris@0 33 parent::__construct('Plugin/InPlaceEditor', $namespaces, $module_handler, 'Drupal\quickedit\Plugin\InPlaceEditorInterface', 'Drupal\quickedit\Annotation\InPlaceEditor');
Chris@0 34 $this->alterInfo('quickedit_editor');
Chris@0 35 $this->setCacheBackend($cache_backend, 'quickedit:editor');
Chris@0 36 }
Chris@0 37
Chris@0 38 }