Drupal 8  8.0.2
MigrateSourceInterface Interface Reference
Inheritance diagram for MigrateSourceInterface:

Public Member Functions

 fields ()
 
 prepareRow (Row $row)
 
 __toString ()
 
 getIds ()
 
- Public Member Functions inherited from PluginInspectionInterface
 getPluginId ()
 
 getPluginDefinition ()
 

Detailed Description

Defines an interface for migrate sources.

See Also
Plugin API

Member Function Documentation

__toString ( )

Allows class to decide how it will react when it is treated like a string.

Implemented in StubSourcePlugin, SqlBase, EmbeddedDataSource, and EmptySource.

getIds ( )

Defines the source fields uniquely identifying a source row.

None of these fields should contain a NULL value. If necessary, use prepareRow() or hook_migrate_prepare_row() to rewrite NULL values to appropriate empty values (such as '' or 0).

Returns
array Array keyed by source field name, with values being a schema array describing the field (such as ['type' => 'string]).

Implemented in StubSourcePlugin, Node, TestDrupal6SqlBase, TestSqlBase, TestSqlBase, NodeType, File, NodeType, User, CommentVariable, ProfileField, Field, Node, Term, FieldInstancePerViewMode, File, Block, FieldInstancePerFormDisplay, CommentType, FieldInstance, FilterFormat, MenuLink, Variable, ProfileFieldValues, Role, User, Comment, Vocabulary, Comment, EmbeddedDataSource, UserPictureFile, FieldInstance, Upload, TermNode, FieldInstancePerFormDisplay, FieldInstancePerViewMode, ContactCategory, Field, FilterFormat, ViewMode, CommentVariablePerCommentType, UploadInstance, ViewMode, VariableMultiRow, Vocabulary, Role, AggregatorFeed, Action, UserPictureInstance, AggregatorItem, Box, EmptySource, Shortcut, UserPicture, ImageCachePreset, ImageStyles, BlockCustom, Menu, TrackerUser, Language, TrackerNode, BlockedIps, ShortcutSet, ShortcutSetUsers, Book, NodeRevision, NodeRevision, UrlAliasBase, and VocabularyPerType.

Referenced by SqlBase\initializeIterator(), and SqlBase\mapJoinable().

Here is the caller graph for this function:

prepareRow ( Row  $row)

Adds additional data to the row.

Parameters
\Drupal\Migrate\Row$rowThe row object.
Returns
bool FALSE if this row needs to be skipped.

Implemented in SourcePluginBase, Block, Term, MenuLink, Role, Field, User, Vocabulary, FieldInstance, Action, FieldInstance, UserPictureFile, ProfileField, TermNode, ImageCachePreset, ImageStyles, User, VariableMultiRow, FieldInstancePerFormDisplay, ContactCategory, Role, and ProfileFieldValues.


The documentation for this interface was generated from the following file: