final class MigrateMessagesCommand extends Command (View source)

Traits

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

Constants

NAME

Properties

protected FormatterOptions $formatterOptions from  FormatterTrait
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.

void
writeFormattedOutput(InputInterface $input, OutputInterface $output, $data)

Filter, format, and write to the output

mixed
alterResult($result, InputInterface $input)

No description

wrapFilteredResult($data, $source)

If the source data was wrapped in a marker class such as RowsOfFields, then re-apply the wrapper.

void
setFormatterOptions(FormatterOptions $formatterOptions)

Public because is used by FormatterListener.

mixed
getPrivatePropValue(mixed $object, $name)

No description

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, FormatterManager $formatterManager)

No description

void
configure()

No description

int
execute(InputInterface $input, OutputInterface $output)

No description

doExecute(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.

protected void writeFormattedOutput(InputInterface $input, OutputInterface $output, $data)

Filter, format, and write to the output

Parameters

InputInterface $input
OutputInterface $output
$data

Return Value

void

protected mixed alterResult($result, InputInterface $input)

No description

Parameters

$result
InputInterface $input

Return Value

mixed

protected wrapFilteredResult($data, $source)

If the source data was wrapped in a marker class such as RowsOfFields, then re-apply the wrapper.

Parameters

$data
$source

protected FormatterOptions getFormatterOptions()

No description

Return Value

FormatterOptions

void setFormatterOptions(FormatterOptions $formatterOptions)

Public because is used by FormatterListener.

Parameters

FormatterOptions $formatterOptions

Return Value

void

protected mixed getPrivatePropValue(mixed $object, $name)

No description

Parameters

mixed $object
$name

Return Value

mixed

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, FormatterManager $formatterManager)

No description

Parameters

KeyValueFactoryInterface $keyValueFactory
ContainerInterface $container
LoggerInterface $logger
FormatterManager $formatterManager

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

RowsOfFields doExecute(InputInterface $input, OutputInterface $output)

No description

Parameters

InputInterface $input
OutputInterface $output

Return Value

RowsOfFields