You are here

class Document in Media Migration 8

Document media migration plugin for local document media entities.

Plugin annotation


@FileEntityDealer(
  id = "document",
  types = {"document"},
  destination_media_type_id_base = "document",
  destination_media_source_plugin_id = "file"
)

Hierarchy

Expanded class hierarchy of Document

1 file declares its use of Document
FileEntityDealerTest.php in tests/src/Kernel/Plugin/FileEntityDealerTest.php
5 string references to 'Document'
FileEntityDealerTest::providerTestFileEntityDealer in tests/src/Kernel/Plugin/FileEntityDealerTest.php
Data provider for .
FileEntitySourceFieldInstanceTest::providerSource in tests/src/Kernel/Plugin/migrate/source/d7/FileEntitySourceFieldInstanceTest.php
The data provider.
MediaMigrationAssertionsForNonMediaSourceTrait::assertNonMediaToMediaDocumentMediaBundleSourceFieldProperties in tests/src/Traits/MediaMigrationAssertionsForNonMediaSourceTrait.php
Checks the properties of the document media type's source field config.
MediaMigrationTestTrait::createStandardMediaTypes in tests/src/Traits/MediaMigrationTestTrait.php
Creates the media types which are shipped with the core standard profile.
MigrateMediaTestBase::getExpectedEntities in tests/src/Functional/MigrateMediaTestBase.php
Gets the expected entity IDs and labels per entity type after migration.

File

src/Plugin/media_migration/file_entity/Document.php, line 15

Namespace

Drupal\media_migration\Plugin\media_migration\file_entity
View source
class Document extends FileBase {

  /**
   * {@inheritdoc}
   */
  public function getDestinationMediaSourceFieldName() {
    return 'field_media_document';
  }

}

Members

Namesort descending Modifiers Type Description Overrides
DependencySerializationTrait::$_entityStorages protected property An array of entity type IDs keyed by the property name of their storages.
DependencySerializationTrait::$_serviceIds protected property An array of service IDs keyed by property name used for serialization.
DependencySerializationTrait::__sleep public function 1
DependencySerializationTrait::__wakeup public function 2
Document::getDestinationMediaSourceFieldName public function Overrides MediaDealerBase::getDestinationMediaSourceFieldName
FileBase::alterMediaEntityMigrationDefinition public function Overrides MediaDealerBase::alterMediaEntityMigrationDefinition 1
FileBase::getFileData protected function Returns display and description properties of the specified file.
FileBase::getFileFieldData protected function Get the name of the file fields from the source database.
FileBase::prepareMediaEntityRow public function Overrides MediaDealerBase::prepareMediaEntityRow 1
MediaDealerBase::$entityTypeManager protected property The entity type manager.
MediaDealerBase::$fieldTypeManager protected property The field type plugin manager service.
MediaDealerBase::$mediaSourceManager protected property The media source plugin manager.
MediaDealerBase::alterMediaFieldFormatterMigrationDefinition public function
MediaDealerBase::alterMediaSourceFieldInstanceMigrationDefinition public function
MediaDealerBase::alterMediaSourceFieldStorageMigrationDefinition public function
MediaDealerBase::alterMediaSourceFieldWidgetMigrationDefinition public function
MediaDealerBase::alterMediaTypeMigrationDefinition public function
MediaDealerBase::create public static function Creates an instance of the plugin. Overrides ContainerFactoryPluginInterface::create
MediaDealerBase::getDestinationMediaSourcePluginId public function 2
MediaDealerBase::getDestinationMediaTypeId public function 1
MediaDealerBase::getDestinationMediaTypeIdBase public function 3
MediaDealerBase::getDestinationMediaTypeLabel public function 3
MediaDealerBase::getDestinationMediaTypeSourceFieldLabel public function 4
MediaDealerBase::getImageData protected function Returns alt, title, with and height properties of the specified file.
MediaDealerBase::getImageFieldData protected function Get the names of the image type fields from the source database.
MediaDealerBase::getMediaSourceFieldInstance protected function Returns a media source field instance.
MediaDealerBase::getMediaSourceFieldStorage protected function Returns a media source field storage.
MediaDealerBase::prepareMediaSourceFieldFormatterRow public function 6
MediaDealerBase::prepareMediaSourceFieldInstanceRow public function 2
MediaDealerBase::prepareMediaSourceFieldStorageRow public function 1
MediaDealerBase::prepareMediaSourceFieldWidgetRow public function
MediaDealerBase::prepareMediaTypeRow public function
MediaDealerBase::__construct public function Constructs a new plugin instance. Overrides PluginBase::__construct
MessengerTrait::$messenger protected property The messenger. 29
MessengerTrait::messenger public function Gets the messenger. 29
MessengerTrait::setMessenger public function Sets the messenger.
PluginBase::$configuration protected property Configuration information passed into the plugin. 1
PluginBase::$pluginDefinition protected property The plugin implementation definition. 1
PluginBase::$pluginId protected property The plugin_id.
PluginBase::DERIVATIVE_SEPARATOR constant A string which is used to separate base plugin IDs from the derivative ID.
PluginBase::getBaseId public function Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface::getBaseId
PluginBase::getDerivativeId public function Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface::getDerivativeId
PluginBase::getPluginDefinition public function Gets the definition of the plugin implementation. Overrides PluginInspectionInterface::getPluginDefinition 3
PluginBase::getPluginId public function Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface::getPluginId
PluginBase::isConfigurable public function Determines if the plugin is configurable.
StringTranslationTrait::$stringTranslation protected property The string translation service. 1
StringTranslationTrait::formatPlural protected function Formats a string containing a count of items.
StringTranslationTrait::getNumberOfPlurals protected function Returns the number of plurals supported by a given language.
StringTranslationTrait::getStringTranslation protected function Gets the string translation service.
StringTranslationTrait::setStringTranslation public function Sets the string translation service to use. 2
StringTranslationTrait::t protected function Translates a string to the current language or to a given language.