public static function MediaMigration::getEmbedMediaReferenceMethod in Media Migration 8
Sets the method of the embedded media reference.
Return value
string The reference method. This might be 'id', or 'uuid'.
2 calls to MediaMigration::getEmbedMediaReferenceMethod()
- ImgTagToEmbedFilter::createEmbedNode in src/
Plugin/ migrate/ process/ ImgTagToEmbedFilter.php - Creates a DOM element representing an embed media on the destination.
- MediaWysiwygFilter::getEmbedCode in src/
Plugin/ migrate/ process/ MediaWysiwygFilter.php - Creates the replacement token for the specified embed filter.
File
- src/
MediaMigration.php, line 157
Class
- MediaMigration
- Media Migration configuration and helpers.
Namespace
Drupal\media_migrationCode
public static function getEmbedMediaReferenceMethod() {
$value_from_settings = Settings::get(self::MEDIA_REFERENCE_METHOD_SETTINGS, self::EMBED_MEDIA_REFERENCE_METHOD_DEFAULT);
if (self::getEmbedTokenDestinationFilterPlugin() === self::MEDIA_TOKEN_DESTINATION_FILTER_MEDIA_EMBED) {
return self::EMBED_MEDIA_REFERENCE_METHOD_UUID;
}
return in_array($value_from_settings, self::VALID_EMBED_MEDIA_REFERENCE_METHODS, TRUE) ? $value_from_settings : self::EMBED_MEDIA_REFERENCE_METHOD_DEFAULT;
}