diff core/lib/Drupal/Component/Plugin/ConfigurablePluginInterface.php @ 0:4c8ae668cc8c

Initial import (non-working)
author Chris Cannam
date Wed, 29 Nov 2017 16:09:58 +0000
parents
children af1871eacc83
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/core/lib/Drupal/Component/Plugin/ConfigurablePluginInterface.php	Wed Nov 29 16:09:58 2017 +0000
@@ -0,0 +1,36 @@
+<?php
+
+namespace Drupal\Component\Plugin;
+
+/**
+ * Provides an interface for a configurable plugin.
+ *
+ * @ingroup plugin_api
+ */
+interface ConfigurablePluginInterface extends DependentPluginInterface {
+
+  /**
+   * Gets this plugin's configuration.
+   *
+   * @return array
+   *   An array of this plugin's configuration.
+   */
+  public function getConfiguration();
+
+  /**
+   * Sets the configuration for this plugin instance.
+   *
+   * @param array $configuration
+   *   An associative array containing the plugin's configuration.
+   */
+  public function setConfiguration(array $configuration);
+
+  /**
+   * Gets default configuration for this plugin.
+   *
+   * @return array
+   *   An associative array with the default configuration.
+   */
+  public function defaultConfiguration();
+
+}