interface MultipleProviderAttributeInterface

Defines a common interface for attributes with multiple providers.

@internal This is a temporary solution to the fact that migration source plugins have more than one provider. This functionality will be moved to core in https://www.drupal.org/node/2786355.

Hierarchy

Expanded class hierarchy of MultipleProviderAttributeInterface

All classes that implement MultipleProviderAttributeInterface

1 file declares its use of MultipleProviderAttributeInterface
AttributeClassDiscoveryAutomatedProviders.php in core/modules/migrate/src/Plugin/Discovery/AttributeClassDiscoveryAutomatedProviders.php

File

core/modules/migrate/src/Attribute/MultipleProviderAttributeInterface.php, line 17

Namespace

Drupal\migrate\Attribute
View source
interface MultipleProviderAttributeInterface extends AttributeInterface {
  
  /**
   * Gets the name of the provider of the attribute class.
   *
   * @return string|null
   *   The provider of the attribute. If there are multiple providers the first
   *   is returned.
   */
  public function getProvider() : ?string;
  
  /**
   * Gets the provider names of the attribute class.
   *
   * @return string[]
   *   The providers of the attribute.
   */
  public function getProviders() : array;
  
  /**
   * Sets the provider names of the attribute class.
   *
   * @param string[] $providers
   *   The providers of the attribute.
   */
  public function setProviders(array $providers) : void;

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title Overrides
AttributeInterface::get public function Gets the value of an attribute. 1
AttributeInterface::getClass public function Gets the class of the attribute class. 1
AttributeInterface::getId public function Gets the unique ID for this attribute class. 1
AttributeInterface::setClass public function Sets the class of the attributed class. 1
AttributeInterface::setProvider public function Sets the name of the provider of the attribute class. 1
MultipleProviderAttributeInterface::getProvider public function Gets the name of the provider of the attribute class. Overrides AttributeInterface::getProvider
MultipleProviderAttributeInterface::getProviders public function Gets the provider names of the attribute class. 1
MultipleProviderAttributeInterface::setProviders public function Sets the provider names of the attribute class. 1

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.