final class MigrateStopCommand extends Command (View source)

Traits

A copy of \Drupal\Core\DependencyInjection\AutowireTrait with first params' type hint changed.

Constants

NAME

Properties

protected MigrationPluginManagerInterface|null $migrationPluginManager from  MigrateRunnerTrait
protected KeyValueStoreInterface $keyValue from  MigrateRunnerTrait

Methods

static 
create(ContainerInterface $container)

Instantiates a new instance of the implementing class using autowiring.

setMigrationPluginManager(MigrationPluginManagerInterface $migrationPluginManager)

Provide a migration plugin manager.

int|null
getMigrationSourceRowsCount(MigrationInterface $migration)

Returns the migration source rows count.

int
getMigrationNeedingUpdateCount(MigrationInterface $migration)

Returns the number of items that needs update.

int|null
getMigrationUnprocessedCount(MigrationInterface $migration)

Returns the number of unprocessed items.

int|null
getMigrationImportedCount(MigrationInterface $migration)

Returns the number of imported items.

string
getMigrationLastImportedTime(MigrationInterface $migration, DateFormatterInterface $dateFormatter)

Returns the last imported date/time if any.

array
padTableRow(array $row, array $fields)

Pads an incomplete table row with empty cells.

array
getMigrationList(string|null $migrationIds, string|null $tags)

Retrieves a list of active migrations.

MigrateMessageInterface
getMigrateMessage()

Returns the migrate message logger.

array
getSourceIdKeys(MigrateIdMapInterface $idMap)

Get the source ID keys.

array
preprocessMessageRow(StdClass $row, array $sourceIdKeys)

Preprocesses migrate message rows.

__construct(KeyValueFactoryInterface $keyValueFactory, ContainerInterface $container, LoggerInterface $logger)

No description

void
configure()

No description

int
execute(InputInterface $input, OutputInterface $output)

No description

Details

static create(ContainerInterface $container)

Instantiates a new instance of the implementing class using autowiring.

Parameters

ContainerInterface $container

The service container this instance should use.

setMigrationPluginManager(MigrationPluginManagerInterface $migrationPluginManager)

Provide a migration plugin manager.

Parameters

MigrationPluginManagerInterface $migrationPluginManager

protected int|null getMigrationSourceRowsCount(MigrationInterface $migration)

Returns the migration source rows count.

Parameters

MigrationInterface $migration

The migration plugin instance.

Return Value

int|null

The migration source rows count or null if the source is uncountable or the source count couldn't be retrieved.

protected int getMigrationNeedingUpdateCount(MigrationInterface $migration)

Returns the number of items that needs update.

Parameters

MigrationInterface $migration

The migration plugin instance.

Return Value

int

The number of items that needs update.

protected int|null getMigrationUnprocessedCount(MigrationInterface $migration)

Returns the number of unprocessed items.

Parameters

MigrationInterface $migration

The migration plugin instance.

Return Value

int|null

The number of unprocessed items or null if it cannot be determined.

protected int|null getMigrationImportedCount(MigrationInterface $migration)

Returns the number of imported items.

Parameters

MigrationInterface $migration

The migration plugin instance.

Return Value

int|null

The number of imported items or null if it cannot be determined.

protected string getMigrationLastImportedTime(MigrationInterface $migration, DateFormatterInterface $dateFormatter)

Returns the last imported date/time if any.

Parameters

MigrationInterface $migration

The migration plugin instance.

DateFormatterInterface $dateFormatter

Return Value

string

The last imported date/time if any.

protected array padTableRow(array $row, array $fields)

Pads an incomplete table row with empty cells.

Parameters

array $row

The row to be prepared.

array $fields

The table columns.

Return Value

array

The complete table row.

protected array getMigrationList(string|null $migrationIds, string|null $tags)

Retrieves a list of active migrations.

Parameters

string|null $migrationIds

A comma-separated list of migration IDs. If omitted, will return all migrations.

string|null $tags

A comma separated list of tags.

Return Value

array

An array keyed by migration tag, each value containing an array of migrations or an empty array if no migrations match the input criteria.

Exceptions

PluginException

protected MigrateMessageInterface getMigrateMessage()

Returns the migrate message logger.

Return Value

MigrateMessageInterface

The migrate message logger.

protected array getSourceIdKeys(MigrateIdMapInterface $idMap)

Get the source ID keys.

Parameters

MigrateIdMapInterface $idMap

The migration ID map.

Return Value

array

The source ID keys.

protected array preprocessMessageRow(StdClass $row, array $sourceIdKeys)

Preprocesses migrate message rows.

Given an item inside the list generated by MigrateIdMapInterface::getMessages(), prepare it for display.

Parameters

StdClass $row

A message to process.

array $sourceIdKeys

The source IDs keys, for reference.

Return Value

array

See also

\Drupal\migrate\Plugin\MigrateIdMapInterface::getMessages()

__construct(KeyValueFactoryInterface $keyValueFactory, ContainerInterface $container, LoggerInterface $logger)

No description

Parameters

KeyValueFactoryInterface $keyValueFactory
ContainerInterface $container
LoggerInterface $logger

protected void configure()

No description

Return Value

void

int execute(InputInterface $input, OutputInterface $output)

No description

Parameters

InputInterface $input
OutputInterface $output

Return Value

int

Exceptions

PluginException