Version 1
[yaffs-website] / web / modules / contrib / linkit / src / AttributeManager.php
diff --git a/web/modules/contrib/linkit/src/AttributeManager.php b/web/modules/contrib/linkit/src/AttributeManager.php
new file mode 100644 (file)
index 0000000..99d5a3b
--- /dev/null
@@ -0,0 +1,29 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\linkit\AttributeManager.
+ */
+
+namespace Drupal\linkit;
+
+use Drupal\Core\Cache\CacheBackendInterface;
+use Drupal\Core\Extension\ModuleHandlerInterface;
+use Drupal\Core\Plugin\DefaultPluginManager;
+
+/**
+ * Manages attributes.
+ */
+class AttributeManager extends DefaultPluginManager {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
+    parent::__construct('Plugin/Linkit/Attribute', $namespaces, $module_handler, 'Drupal\linkit\AttributeInterface', 'Drupal\linkit\Annotation\Attribute');
+
+    $this->alterInfo('linkit_attribute');
+    $this->setCacheBackend($cache_backend, 'linkit_attributes');
+  }
+
+}