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;

}

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