class MigrateSource extends Plugin implements MultipleProviderAnnotationInterface (View source)

Defines a migration source plugin annotation object.

Plugin Namespace: Plugin\migrate\source

For a working example, check \Drupal\migrate\Plugin\migrate\source\EmptySource \Drupal\migrate_drupal\Plugin\migrate\source\UrlAlias

Properties

protected array $definition

The plugin definition read from the class annotation.

from  Plugin
string $id

A unique identifier for the process plugin.

bool $requirements_met

Whether requirements are met.

string $source_module

Identifies the system providing the data the source plugin will read.

mixed $minimum_version

Specifies the minimum version of the source provider.

Methods

__construct($values)

Constructs a Plugin object.

from  Plugin
array
parse(array $values)

Parses an annotation into its definition.

from  Plugin
get()

Gets the value of an annotation.

from  Plugin
string
getProvider()

Gets the name of the provider of the annotated class.

setProvider(string $provider)

Sets the name of the provider of the annotated class.

from  Plugin
string
getId()

Gets the unique ID for this annotated class.

from  Plugin
string
getClass()

Gets the class of the annotated class.

from  Plugin
setClass(string $class)

Sets the class of the annotated class.

from  Plugin
string[]
getProviders()

Gets the provider names of the annotated class.

setProviders(array $providers)

Sets the provider names of the annotated class.

Details

__construct($values)

Constructs a Plugin object.

Builds up the plugin definition and invokes the get() method for any classed annotations that were used.

Parameters

$values

protected array parse(array $values)

Parses an annotation into its definition.

Parameters

array $values

The annotation array.

Return Value

array

The parsed annotation as a definition.

get()

Gets the value of an annotation.

string getProvider()

Gets the name of the provider of the annotated class.

Return Value

string

setProvider(string $provider)

Sets the name of the provider of the annotated class.

Parameters

string $provider

The provider of the annotated class.

string getId()

Gets the unique ID for this annotated class.

Return Value

string

string getClass()

Gets the class of the annotated class.

Return Value

string

setClass(string $class)

Sets the class of the annotated class.

Parameters

string $class

The class of the annotated class.

string[] getProviders()

Gets the provider names of the annotated class.

Return Value

string[]

The providers of the annotation.

setProviders(array $providers)

Sets the provider names of the annotated class.

Parameters

array $providers

The providers of the annotation.