You are here

interface PluginTypeInterface in Plugin 8.2

Defines a plugin type.

Hierarchy

Expanded class hierarchy of PluginTypeInterface

All classes that implement PluginTypeInterface

23 files declare their use of PluginTypeInterface
AdvancedPluginSelectorBasePluginSelectorForm.php in tests/modules/plugin_test_helper/src/AdvancedPluginSelectorBasePluginSelectorForm.php
DefaultPluginResolverInterface.php in src/DefaultPluginResolver/DefaultPluginResolverInterface.php
EventBasedDefaultPluginResolver.php in src/DefaultPluginResolver/EventBasedDefaultPluginResolver.php
EventBasedDefaultPluginResolverTest.php in tests/src/Unit/DefaultPluginResolver/EventBasedDefaultPluginResolverTest.php
ListPlugins.php in src/Controller/ListPlugins.php

... See full list

File

src/PluginType/PluginTypeInterface.php, line 10

Namespace

Drupal\plugin\PluginType
View source
interface PluginTypeInterface {

  /**
   * Creates a plugin type based on a definition.
   *
   * @param \Symfony\Component\DependencyInjection\ContainerInterface $container
   * @param mixed[] $definition
   *
   * @return static
   */
  public static function createFromDefinition(ContainerInterface $container, array $definition);

  /**
   * Gets the ID.
   *
   * @return string
   */
  public function getId();

  /**
   * Gets the human-readable label.
   *
   * @return \Drupal\Core\StringTranslation\TranslatableMarkup|string
   */
  public function getLabel();

  /**
   * Gets the human-readable description.
   *
   * @return \Drupal\Core\StringTranslation\TranslatableMarkup|string
   */
  public function getDescription();

  /**
   * Gets the plugin type provider.
   *
   * @return string
   *   The provider is the machine name of the module that provides the plugin
   *   type.
   */
  public function getProvider();

  /**
   * Gets the service name of the plugin manager.
   *
   * @return string
   *   The service name of the plugin manager.
   */
  public function getPluginManagerServiceName();

  /**
   * Gets the plugin manager.
   *
   * @return \Drupal\Component\Plugin\PluginManagerInterface
   */
  public function getPluginManager();

  /**
   * Ensures that a plugin definition is typed.
   *
   * @param \Drupal\plugin\PluginDefinition\PluginDefinitionInterface|mixed $plugin_definition
   *   An original plugin definition of this type. It may already be typed.
   *
   * @return \Drupal\plugin\PluginDefinition\PluginDefinitionInterface
   *   The typed plugin definition.
   *
   * @throws \InvalidArgumentException
   *   Thrown when a typed definition could not be returned.
   */
  public function ensureTypedPluginDefinition($plugin_definition);

  /**
   * Gets the operations provider.
   *
   * @return \Drupal\plugin\PluginType\PluginTypeOperationsProviderInterface
   */
  public function getOperationsProvider();

  /**
   * Gets whether plugin type can be used as a field type.
   *
   * @return bool
   */
  public function isFieldType();

}

Members

Namesort descending Modifiers Type Description Overrides
PluginTypeInterface::createFromDefinition public static function Creates a plugin type based on a definition. 1
PluginTypeInterface::ensureTypedPluginDefinition public function Ensures that a plugin definition is typed. 1
PluginTypeInterface::getDescription public function Gets the human-readable description. 1
PluginTypeInterface::getId public function Gets the ID. 1
PluginTypeInterface::getLabel public function Gets the human-readable label. 1
PluginTypeInterface::getOperationsProvider public function Gets the operations provider. 1
PluginTypeInterface::getPluginManager public function Gets the plugin manager. 1
PluginTypeInterface::getPluginManagerServiceName public function Gets the service name of the plugin manager. 1
PluginTypeInterface::getProvider public function Gets the plugin type provider. 1
PluginTypeInterface::isFieldType public function Gets whether plugin type can be used as a field type. 1