TrackChangesTest.php
Same filename in this branch
Same filename in other branches
- 8.9.x core/modules/migrate/tests/src/Kernel/TrackChangesTest.php
- 8.9.x core/modules/migrate/tests/modules/migrate_track_changes_test/src/Plugin/migrate/source/TrackChangesTest.php
- 10 core/modules/migrate/tests/src/Kernel/TrackChangesTest.php
- 10 core/modules/migrate/tests/modules/migrate_track_changes_test/src/Plugin/migrate/source/TrackChangesTest.php
- 11.x core/modules/migrate/tests/src/Kernel/TrackChangesTest.php
- 11.x core/modules/migrate/tests/modules/migrate_track_changes_test/src/Plugin/migrate/source/TrackChangesTest.php
Namespace
Drupal\migrate_track_changes_test\Plugin\migrate\sourceFile
-
core/
modules/ migrate/ tests/ modules/ migrate_track_changes_test/ src/ Plugin/ migrate/ source/ TrackChangesTest.php
View source
<?php
namespace Drupal\migrate_track_changes_test\Plugin\migrate\source;
use Drupal\migrate\Plugin\migrate\source\SqlBase;
/**
* Source plugin for migration track changes tests.
*
* @MigrateSource(
* id = "track_changes_test"
* )
*/
class TrackChangesTest extends SqlBase {
/**
* {@inheritdoc}
*/
public function query() {
$field_names = array_keys($this->fields());
$query = $this->select('track_changes_term', 't')
->fields('t', $field_names);
foreach ($field_names as $field_name) {
$query->groupBy($field_name);
}
return $query;
}
/**
* {@inheritdoc}
*/
public function fields() {
$fields = [
'tid' => $this->t('Term id'),
'name' => $this->t('Name'),
'description' => $this->t('Description'),
];
return $fields;
}
/**
* {@inheritdoc}
*/
public function getIds() {
return [
'tid' => [
'type' => 'integer',
],
];
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
TrackChangesTest | Source plugin for migration track changes tests. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.