OverviewForm
class OverviewForm extends MigrateUpgradeFormBase (View source)
| internal |
Migrate Upgrade Overview form.
Traits
Configures the appropriate migrations for a given source Drupal database.
Provides dependency injection friendly methods for serialization.
Wrapper methods for the logger factory service.
Provides a trait for the messenger service.
Wrapper methods for the Redirect Destination.
Wrapper methods for \Drupal\Core\StringTranslation\TranslationInterface.
Properties
| protected array | $_serviceIds | An array of service IDs keyed by property name used for serialization. |
from DependencySerializationTrait |
| protected array | $_entityStorages | An array of entity type IDs keyed by the property name of their storages. |
from DependencySerializationTrait |
| protected LoggerChannelFactoryInterface | $loggerFactory | The logger channel factory service. |
from LoggerChannelTrait |
| protected MessengerInterface | $messenger | The messenger. |
from MessengerTrait |
| protected RedirectDestinationInterface | $redirectDestination | The redirect destination service. |
from RedirectDestinationTrait |
| protected TranslationInterface | $stringTranslation | The string translation service. |
from StringTranslationTrait |
| protected RequestStack | $requestStack | The request stack. |
from FormBase |
| protected ConfigFactoryInterface | $configFactory | The config factory service. |
from MigrationConfigurationTrait |
| protected RouteMatchInterface | $routeMatch | The route match. |
from FormBase |
| protected MigrationPluginManagerInterface | $migrationPluginManager | The migration plugin manager service. |
from MigrationConfigurationTrait |
| protected StateInterface | $state | The state service. |
from MigrationConfigurationTrait |
| protected string[] | $followUpMigrationTags | The follow-up migration tags. |
from MigrationConfigurationTrait |
| protected PrivateTempStoreFactory | $store | Private temporary storage. |
from MigrateUpgradeFormBase |
| protected string | $destinationSiteVersion | The destination site major version. |
from MigrateUpgradeFormBase |
Methods
Gets the logger for a specific channel.
Prepares a 'destination' URL query parameter for use with \Drupal\Core\Url.
Returns the redirect destination service.
Sets the redirect destination service.
Translates a string to the current language or to a given language.
Formats a string containing a count of items.
Returns the number of plurals supported by a given language.
Gets the string translation service.
Instantiates a new instance of this class.
Sets the request stack object to use.
Returns a redirect response object for the specified route.
Gets the database connection for the source Drupal database.
Gets the system data from the system table of the source Drupal database.
Creates the necessary state entries for SqlBase::getDatabase() to work.
Gets the migrations for import.
Returns the follow-up migration tags.
Determines what version of Drupal the source database contains.
Gets the config factory service.
Gets the migration plugin manager service.
Constructs the Migrate Upgrade Form Base.
Helper to redirect to the Overview form.
Returns a caption for the button that confirms the action.
Returns a unique string identifying the form.
Details
__sleep()
{@inheritdoc}
__wakeup()
{@inheritdoc}
protected LoggerInterface
getLogger(string $channel)
Gets the logger for a specific channel.
$this
setLoggerFactory(LoggerChannelFactoryInterface $logger_factory)
Injects the logger channel factory.
setMessenger(MessengerInterface $messenger)
Sets the messenger.
MessengerInterface
messenger()
Gets the messenger.
protected array
getDestinationArray()
Prepares a 'destination' URL query parameter for use with \Drupal\Core\Url.
protected RedirectDestinationInterface
getRedirectDestination()
Returns the redirect destination service.
$this
setRedirectDestination(RedirectDestinationInterface $redirect_destination)
Sets the redirect destination service.
protected TranslatableMarkup
t(string $string, array $args = [], array $options = [])
Translates a string to the current language or to a given language.
See \Drupal\Core\StringTranslation\TranslatableMarkup::__construct() for important security information and usage guidelines.
In order for strings to be localized, make them available in one of the ways supported by the
protected
formatPlural($count, $singular, $plural, array $args = [], array $options = [])
Formats a string containing a count of items.
protected
getNumberOfPlurals($langcode = NULL)
Returns the number of plurals supported by a given language.
protected TranslationInterface
getStringTranslation()
Gets the string translation service.
$this
setStringTranslation(TranslationInterface $translation)
Sets the string translation service to use.
static
create(ContainerInterface $container)
Instantiates a new instance of this class.
This is a factory method that returns a new instance of this class. The factory should pass any needed dependencies into the constructor of this class, but not the container itself. Every call to this method must return a new instance of this class; that is, it may not implement a singleton.
validateForm(array $form, FormStateInterface $form_state)
Form validation handler.
protected ImmutableConfig
config(string $name)
Retrieves a configuration object.
This is the main entry point to the configuration API. Calling
protected ConfigFactoryInterface
configFactory()
Gets the config factory for this form.
When accessing configuration values, use $this->config(). Only use this when the config factory needs to be manipulated directly.
$this
setConfigFactory(ConfigFactoryInterface $config_factory)
Sets the config factory for this form.
resetConfigFactory()
Resets the configuration factory.
protected Request
getRequest()
Gets the request object.
protected RouteMatchInterface
getRouteMatch()
Gets the route match.
$this
setRequestStack(RequestStack $request_stack)
Sets the request stack object to use.
protected AccountInterface
currentUser()
Gets the current user.
protected RedirectResponse
redirect(string $route_name, array $route_parameters = [], array $options = [], int $status = 302)
Returns a redirect response object for the specified route.
protected LoggerInterface
logger(string $channel)
Gets the logger for a specific channel.
This method exists for backward-compatibility between FormBase and LoggerChannelTrait. Use LoggerChannelTrait::getLogger() instead.
protected Connection
getConnection(array $database)
Gets the database connection for the source Drupal database.
protected array
getSystemData(Connection $connection)
Gets the system data from the system table of the source Drupal database.
protected
createDatabaseStateSettings(array $database, string $drupal_version)
Creates the necessary state entries for SqlBase::getDatabase() to work.
The state entities created here have to exist before migration plugin instances are created so that derivers such as \Drupal\taxonomy\Plugin\migrate\D6TermNodeDeriver can access the source database.
protected MigrationInterface[]
getMigrations(string $database_state_key, int $drupal_version)
Gets the migrations for import.
protected string[]
getFollowUpMigrationTags()
Returns the follow-up migration tags.
static string|false
getLegacyDrupalVersion(Connection $connection)
Determines what version of Drupal the source database contains.
protected ConfigFactoryInterface
getConfigFactory()
Gets the config factory service.
protected MigrationPluginManagerInterface
getMigrationPluginManager()
Gets the migration plugin manager service.
protected StateInterface
getState()
Gets the state service.
__construct(ConfigFactoryInterface $config_factory, MigrationPluginManagerInterface $migration_plugin_manager, StateInterface $state, PrivateTempStoreFactory $tempstore_private)
Constructs the Migrate Upgrade Form Base.
array
buildForm(array $form, FormStateInterface $form_state)
Form constructor.
protected RedirectResponse
restartUpgradeForm()
Helper to redirect to the Overview form.
string
getConfirmText()
Returns a caption for the button that confirms the action.
string
getFormId()
Returns a unique string identifying the form.
The returned ID should be a unique string that can be a valid PHP function name, since it's used in hook implementation names such as hook_form_FORM_ID_alter().
submitForm(array $form, FormStateInterface $form_state)
Form submission handler.