You are here

interface ExtraFieldTypePluginInterface in Entity Extra Field 2.0.x

Same name and namespace in other branches
  1. 8 src/ExtraFieldTypePluginInterface.php \Drupal\entity_extra_field\ExtraFieldTypePluginInterface

Define extra field type plugin interface.

Hierarchy

Expanded class hierarchy of ExtraFieldTypePluginInterface

All classes that implement ExtraFieldTypePluginInterface

2 files declare their use of ExtraFieldTypePluginInterface
EntityExtraField.php in src/Entity/EntityExtraField.php
EntityExtraFieldForm.php in src/Form/EntityExtraFieldForm.php

File

src/ExtraFieldTypePluginInterface.php, line 15

Namespace

Drupal\entity_extra_field
View source
interface ExtraFieldTypePluginInterface extends PluginFormInterface, ContainerFactoryPluginInterface, ConfigurableInterface, DependentPluginInterface {

  /**
   * Display the extra field plugin label.
   *
   * @return string
   *   Return the extra field plugin label.
   */
  public function label() : string;

  /**
   * Build the render array of the extra field type contents.
   *
   * @param \Drupal\Core\Entity\EntityInterface $entity
   *   The entity type the extra field is being attached too.
   * @param \Drupal\Core\Entity\Display\EntityDisplayInterface $display
   *   The entity display the extra field is apart of.
   *
   * @return array
   *   The extra field renderable array.
   *
   * @throws \Drupal\Component\Plugin\Exception\PluginException
   */
  public function build(EntityInterface $entity, EntityDisplayInterface $display) : array;

}

Members

Namesort descending Modifiers Type Description Overrides
ConfigurableInterface::defaultConfiguration public function Gets default configuration for this plugin. 14
ConfigurableInterface::getConfiguration public function Gets this plugin's configuration. 15
ConfigurableInterface::setConfiguration public function Sets the configuration for this plugin instance. 15
ContainerFactoryPluginInterface::create public static function Creates an instance of the plugin. 120
DependentPluginInterface::calculateDependencies public function Calculates dependencies for the configured plugin. 20
ExtraFieldTypePluginInterface::build public function Build the render array of the extra field type contents. 4
ExtraFieldTypePluginInterface::label public function Display the extra field plugin label. 1
PluginFormInterface::buildConfigurationForm public function Form constructor. 37
PluginFormInterface::submitConfigurationForm public function Form submission handler. 32
PluginFormInterface::validateConfigurationForm public function Form validation handler. 18