blob: 437ddfb8b9aeb28d5ff5ff17929e94ebf4208a6b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
<?php
declare(strict_types=1);
namespace Drupal\migrate\Attribute;
use Drupal\Component\Plugin\Attribute\AttributeInterface;
/**
* 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.
*/
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;
}
|