PluginInspectionInterface.php 751 Bytes
Newer Older
1 2 3
<?php
/**
 * @file
4
 * Contains \Drupal\Component\Plugin\PluginInspectionInterface.
5 6 7 8 9 10 11
 */

namespace Drupal\Component\Plugin;

/**
 * Plugin interface for providing some metadata inspection.
 *
12
 * This interface provides some simple tools for code receiving a plugin to
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
 * interact with the plugin system.
 */
interface PluginInspectionInterface {

  /**
   * Returns the plugin_id of the plugin instance.
   *
   * @return string
   *   The plugin_id of the plugin instance.
   */
  public function getPluginId();

  /**
   * Returns the definition of the plugin implementation.
   *
   * @return array
   *   The plugin definition, as returned by the discovery object used by the
   *   plugin manager.
   */
32
  public function getPluginDefinition();
33
}