You are here

interface DsFieldInterface in Display Suite 8.2

Same name and namespace in other branches
  1. 8.4 src/Plugin/DsField/DsFieldInterface.php \Drupal\ds\Plugin\DsField\DsFieldInterface
  2. 8.3 src/Plugin/DsField/DsFieldInterface.php \Drupal\ds\Plugin\DsField\DsFieldInterface

Interface for DS plugins.

Hierarchy

Expanded class hierarchy of DsFieldInterface

All classes that implement DsFieldInterface

1 file declares its use of DsFieldInterface
field_ui.inc in includes/field_ui.inc
Field UI functions for Display Suite.

File

src/Plugin/DsField/DsFieldInterface.php, line 12

Namespace

Drupal\ds\Plugin\DsField
View source
interface DsFieldInterface extends ConfigurablePluginInterface, ContainerFactoryPluginInterface {

  /**
   * Renders a field.
   */
  public function build();

  /**
   * Returns the summary of the chosen settings.
   *
   * @param array $settings
   *   Contains the settings of the field.
   *
   * @return array
   *   A render array containing the summary.
   */
  public function settingsSummary($settings);

  /**
   * The form that holds the settings for this plugin.
   */
  public function settingsForm($form, FormStateInterface $form_state);

  /**
   * Returns a list of possible formatters for this field.
   *
   * @return array
   *   A list of possible formatters.
   */
  public function formatters();

  /**
   * Returns if the field is allowed on the field UI screen.
   */
  public function isAllowed();

  /**
   * Gets the current entity.
   *
   * @return \Drupal\Core\Entity\EntityInterface
   *   The current entity.
   */
  public function entity();

  /**
   * Gets the current entity type.
   */
  public function getEntityTypeId();

  /**
   * Gets the current bundle.
   */
  public function bundle();

  /**
   * Gets the view mode.
   */
  public function viewMode();

  /**
   * Gets the field configuration.
   */
  public function getFieldConfiguration();

  /**
   * Gets the field name.
   */
  public function getName();

  /**
   * Returns the title of the field.
   */
  public function getTitle();

  /**
   * Defines if we are dealing with a multivalue field.
   */
  public function isMultiple();

}

Members

Namesort descending Modifiers Type Description Overrides
ConfigurablePluginInterface::defaultConfiguration public function Gets default configuration for this plugin. 1
ConfigurablePluginInterface::getConfiguration public function Gets this plugin's configuration. 1
ConfigurablePluginInterface::setConfiguration public function Sets the configuration for this plugin instance. 1
ContainerFactoryPluginInterface::create public static function Creates an instance of the plugin. 112
DependentPluginInterface::calculateDependencies public function Calculates dependencies for the configured plugin. 19
DsFieldInterface::build public function Renders a field. 1
DsFieldInterface::bundle public function Gets the current bundle. 1
DsFieldInterface::entity public function Gets the current entity. 1
DsFieldInterface::formatters public function Returns a list of possible formatters for this field. 1
DsFieldInterface::getEntityTypeId public function Gets the current entity type. 1
DsFieldInterface::getFieldConfiguration public function Gets the field configuration. 1
DsFieldInterface::getName public function Gets the field name. 1
DsFieldInterface::getTitle public function Returns the title of the field. 1
DsFieldInterface::isAllowed public function Returns if the field is allowed on the field UI screen. 1
DsFieldInterface::isMultiple public function Defines if we are dealing with a multivalue field. 1
DsFieldInterface::settingsForm public function The form that holds the settings for this plugin. 1
DsFieldInterface::settingsSummary public function Returns the summary of the chosen settings. 1
DsFieldInterface::viewMode public function Gets the view mode. 1