annotate core/lib/Drupal/Component/Plugin/ConfigurablePluginInterface.php @ 19:fa3358dc1485 tip

Add ndrum files
author Chris Cannam
date Wed, 28 Aug 2019 13:14:47 +0100
parents af1871eacc83
children
rev   line source
Chris@0 1 <?php
Chris@0 2
Chris@0 3 namespace Drupal\Component\Plugin;
Chris@0 4
Chris@0 5 /**
Chris@0 6 * Provides an interface for a configurable plugin.
Chris@0 7 *
Chris@18 8 * @deprecated Drupal\Component\Plugin\ConfigurablePluginInterface is deprecated
Chris@18 9 * in Drupal 8.7.0 and will be removed before Drupal 9.0.0. You should implement
Chris@18 10 * ConfigurableInterface and/or DependentPluginInterface directly as needed. If
Chris@18 11 * you implement ConfigurableInterface you may choose to implement
Chris@18 12 * ConfigurablePluginInterface in Drupal 8 as well for maximum compatibility,
Chris@18 13 * however this must be removed prior to Drupal 9.
Chris@18 14 *
Chris@18 15 * @see https://www.drupal.org/node/2946161
Chris@18 16 *
Chris@0 17 * @ingroup plugin_api
Chris@0 18 */
Chris@0 19 interface ConfigurablePluginInterface extends DependentPluginInterface {
Chris@0 20
Chris@0 21 /**
Chris@0 22 * Gets this plugin's configuration.
Chris@0 23 *
Chris@0 24 * @return array
Chris@0 25 * An array of this plugin's configuration.
Chris@0 26 */
Chris@0 27 public function getConfiguration();
Chris@0 28
Chris@0 29 /**
Chris@0 30 * Sets the configuration for this plugin instance.
Chris@0 31 *
Chris@0 32 * @param array $configuration
Chris@0 33 * An associative array containing the plugin's configuration.
Chris@0 34 */
Chris@0 35 public function setConfiguration(array $configuration);
Chris@0 36
Chris@0 37 /**
Chris@0 38 * Gets default configuration for this plugin.
Chris@0 39 *
Chris@0 40 * @return array
Chris@0 41 * An associative array with the default configuration.
Chris@0 42 */
Chris@0 43 public function defaultConfiguration();
Chris@0 44
Chris@0 45 }