function NodeMigrateTypeTestTrait::getTableName
Same name in other branches
- 9 core/modules/migrate_drupal/tests/src/Traits/NodeMigrateTypeTestTrait.php \Drupal\Tests\migrate_drupal\Traits\NodeMigrateTypeTestTrait::getTableName()
- 10 core/modules/migrate_drupal/tests/src/Traits/NodeMigrateTypeTestTrait.php \Drupal\Tests\migrate_drupal\Traits\NodeMigrateTypeTestTrait::getTableName()
- 11.x core/modules/migrate_drupal/tests/src/Traits/NodeMigrateTypeTestTrait.php \Drupal\Tests\migrate_drupal\Traits\NodeMigrateTypeTestTrait::getTableName()
Gets the migrate_map table name.
Parameters
string $type: The type of node migration, 'complete' or 'classic'.
string $version: The source database version.
Return value
string The migrate_map table name.
2 calls to NodeMigrateTypeTestTrait::getTableName()
- NodeMigrateTypeTestTrait::makeNodeMigrateMapTable in core/
modules/ migrate_drupal/ tests/ src/ Traits/ NodeMigrateTypeTestTrait.php - Create a node migrate_map table.
- NodeMigrateTypeTestTrait::removeNodeMigrateMapTable in core/
modules/ migrate_drupal/ tests/ src/ Traits/ NodeMigrateTypeTestTrait.php - Remove the node migrate map table.
File
-
core/
modules/ migrate_drupal/ tests/ src/ Traits/ NodeMigrateTypeTestTrait.php, line 68
Class
- NodeMigrateTypeTestTrait
- Helper functions to test complete and classic node migrations.
Namespace
Drupal\Tests\migrate_drupal\TraitsCode
protected function getTableName($type, $version) {
if (!$this->tableName) {
// PostgreSQL table names are automatically converted lowercase. If this
// string is not lowercase then we can't remove the table in
// \Drupal\Tests\migrate_drupal\Traits\NodeMigrateTypeTestTrait::removeNodeMigrateMapTable().
$content_type = strtolower($this->randomMachineName());
$this->tableName = 'migrate_map_d' . $version . '_node_complete__' . $content_type;
if ($type == NodeMigrateType::NODE_MIGRATE_TYPE_CLASSIC) {
$this->tableName = 'migrate_map_d' . $version . '_node__' . $content_type;
}
}
return $this->tableName;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.