You are here

class DummyMediaDealerPlugin in Media Migration 8

A Dummy media dealer plugin for testing Media Migration.

Hierarchy

Expanded class hierarchy of DummyMediaDealerPlugin

1 file declares its use of DummyMediaDealerPlugin
FileEntityItemTest.php in tests/src/Kernel/Plugin/migrate/source/d7/FileEntityItemTest.php

File

tests/src/Kernel/Plugin/migrate/source/DummyMediaDealerPlugin.php, line 13

Namespace

Drupal\Tests\media_migration\Kernel\Plugin\migrate\source
View source
class DummyMediaDealerPlugin extends PluginBase implements FileEntityDealerPluginInterface {

  /**
   * {@inheritdoc}
   */
  public function getDestinationMediaTypeId() {
    return implode('_', array_filter([
      $this
        ->getDestinationMediaTypeIdBase(),
      $this->configuration['scheme'] === 'public' ? NULL : $this->configuration['scheme'],
    ]));
  }

  /**
   * {@inheritdoc}
   */
  public function getDestinationMediaTypeIdBase() {
    return $this->pluginDefinition['destination_media_type_id_base'];
  }

  /**
   * {@inheritdoc}
   */
  public function getDestinationMediaTypeLabel() {
    return $this
      ->getDestinationMediaTypeId();
  }

  /**
   * {@inheritdoc}
   */
  public function getDestinationMediaTypeSourceFieldLabel() {
    return $this
      ->getDestinationMediaTypeId();
  }

  /**
   * {@inheritdoc}
   */
  public function getDestinationMediaSourceFieldName() {
    return $this
      ->getDestinationMediaTypeId();
  }

  /**
   * {@inheritdoc}
   */
  public function getDestinationMediaSourcePluginId() {
    return $this->configuration['destination_media_source_plugin_id'];
  }

  /**
   * {@inheritdoc}
   */
  public function alterMediaTypeMigrationDefinition(array &$migration_definition, Connection $connection) : void {
  }

  /**
   * {@inheritdoc}
   */
  public function alterMediaSourceFieldStorageMigrationDefinition(array &$migration_definition, Connection $connection) : void {
  }

  /**
   * {@inheritdoc}
   */
  public function alterMediaSourceFieldInstanceMigrationDefinition(array &$migration_definition, Connection $connection) : void {
  }

  /**
   * {@inheritdoc}
   */
  public function alterMediaSourceFieldWidgetMigrationDefinition(array &$migration_definition, Connection $connection) : void {
  }

  /**
   * {@inheritdoc}
   */
  public function alterMediaFieldFormatterMigrationDefinition(array &$migration_definition, Connection $connection) : void {
  }

  /**
   * {@inheritdoc}
   */
  public function alterMediaEntityMigrationDefinition(array &$migration_definition, Connection $connection) : void {
  }

  /**
   * {@inheritdoc}
   */
  public function prepareMediaTypeRow(Row $row, Connection $connection) : void {
  }

  /**
   * {@inheritdoc}
   */
  public function prepareMediaSourceFieldStorageRow(Row $row, Connection $connection) : void {
  }

  /**
   * {@inheritdoc}
   */
  public function prepareMediaSourceFieldInstanceRow(Row $row, Connection $connection) : void {
  }

  /**
   * {@inheritdoc}
   */
  public function prepareMediaSourceFieldWidgetRow(Row $row, Connection $connection) : void {
  }

  /**
   * {@inheritdoc}
   */
  public function prepareMediaSourceFieldFormatterRow(Row $row, Connection $connection) : void {
  }

  /**
   * {@inheritdoc}
   */
  public function prepareMediaEntityRow(Row $row, Connection $connection) : void {
  }

}

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
DummyMediaDealerPlugin::alterMediaEntityMigrationDefinition public function Alters the definition of the media entity migration. Overrides MediaDealerPluginInterface::alterMediaEntityMigrationDefinition
DummyMediaDealerPlugin::alterMediaFieldFormatterMigrationDefinition public function Alters the definition of the media field's formatter settings migration. Overrides MediaDealerPluginInterface::alterMediaFieldFormatterMigrationDefinition
DummyMediaDealerPlugin::alterMediaSourceFieldInstanceMigrationDefinition public function Alters the definition of the media source field instance migration. Overrides MediaDealerPluginInterface::alterMediaSourceFieldInstanceMigrationDefinition
DummyMediaDealerPlugin::alterMediaSourceFieldStorageMigrationDefinition public function Alters the definition of the media source field storage migration. Overrides MediaDealerPluginInterface::alterMediaSourceFieldStorageMigrationDefinition
DummyMediaDealerPlugin::alterMediaSourceFieldWidgetMigrationDefinition public function Alters the definition of the media source field widget settings migration. Overrides MediaDealerPluginInterface::alterMediaSourceFieldWidgetMigrationDefinition
DummyMediaDealerPlugin::alterMediaTypeMigrationDefinition public function Alters the definition of the media type migration. Overrides MediaDealerPluginInterface::alterMediaTypeMigrationDefinition
DummyMediaDealerPlugin::getDestinationMediaSourceFieldName public function Returns the destination media type's source field name. Overrides MediaDealerPluginInterface::getDestinationMediaSourceFieldName
DummyMediaDealerPlugin::getDestinationMediaSourcePluginId public function Returns the destination media type's source plugin ID. Overrides MediaDealerPluginInterface::getDestinationMediaSourcePluginId
DummyMediaDealerPlugin::getDestinationMediaTypeId public function Returns the destination media type's ID. Overrides MediaDealerPluginInterface::getDestinationMediaTypeId
DummyMediaDealerPlugin::getDestinationMediaTypeIdBase public function Returns the destination media type's ID base. Overrides MediaDealerPluginInterface::getDestinationMediaTypeIdBase
DummyMediaDealerPlugin::getDestinationMediaTypeLabel public function Returns the label of the destination media type. Overrides MediaDealerPluginInterface::getDestinationMediaTypeLabel
DummyMediaDealerPlugin::getDestinationMediaTypeSourceFieldLabel public function Returns the label of the destination media type's source field. Overrides MediaDealerPluginInterface::getDestinationMediaTypeSourceFieldLabel
DummyMediaDealerPlugin::prepareMediaEntityRow public function Prepares the migration row of a media item. Overrides MediaDealerPluginInterface::prepareMediaEntityRow
DummyMediaDealerPlugin::prepareMediaSourceFieldFormatterRow public function Prepares the migration row of a media field formatter configuration. Overrides MediaDealerPluginInterface::prepareMediaSourceFieldFormatterRow
DummyMediaDealerPlugin::prepareMediaSourceFieldInstanceRow public function Prepares the migration row of a media source field instance. Overrides MediaDealerPluginInterface::prepareMediaSourceFieldInstanceRow
DummyMediaDealerPlugin::prepareMediaSourceFieldStorageRow public function Prepares the migration row of a media source field storage. Overrides MediaDealerPluginInterface::prepareMediaSourceFieldStorageRow
DummyMediaDealerPlugin::prepareMediaSourceFieldWidgetRow public function Prepares the migration row of a media field widget configuration. Overrides MediaDealerPluginInterface::prepareMediaSourceFieldWidgetRow
DummyMediaDealerPlugin::prepareMediaTypeRow public function Prepares the migration row of a media type. Overrides MediaDealerPluginInterface::prepareMediaTypeRow
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.
PluginBase::__construct public function Constructs a \Drupal\Component\Plugin\PluginBase object. 92
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.