public function BasicExampleMigration::__construct in Migrate 7.2
Same name and namespace in other branches
- 6.2 migrate_example/beer.inc \BasicExampleMigration::__construct()
General initialization of a Migration object.
Overrides Migration::__construct
4 calls to BasicExampleMigration::__construct()
- BeerCommentMigration::__construct in migrate_example/
beer.inc - General initialization of a Migration object.
- BeerNodeMigration::__construct in migrate_example/
beer.inc - General initialization of a Migration object.
- BeerTermMigration::__construct in migrate_example/
beer.inc - General initialization of a Migration object.
- BeerUserMigration::__construct in migrate_example/
beer.inc - General initialization of a Migration object.
4 methods override BasicExampleMigration::__construct()
- BeerCommentMigration::__construct in migrate_example/
beer.inc - General initialization of a Migration object.
- BeerNodeMigration::__construct in migrate_example/
beer.inc - General initialization of a Migration object.
- BeerTermMigration::__construct in migrate_example/
beer.inc - General initialization of a Migration object.
- BeerUserMigration::__construct in migrate_example/
beer.inc - General initialization of a Migration object.
File
- migrate_example/
beer.inc, line 45 - A basic example of using the Migrate module to import taxonomy, users, nodes, and comments.
Class
- BasicExampleMigration
- To define a migration process from a set of source data to a particular kind of Drupal object (for example, a specific node type), you define a class derived from Migration. You must define a constructor to initialize your migration object.
Code
public function __construct($arguments) {
parent::__construct($arguments);
// With migrate_ui enabled, migration pages will indicate people involved in
// the particular migration, with their role and contact info. We default the
// list in the shared class; it can be overridden for specific migrations.
$this->team = array(
new MigrateTeamMember('Liz Taster', 'ltaster@example.com', t('Product Owner')),
new MigrateTeamMember('Larry Brewer', 'lbrewer@example.com', t('Implementor')),
);
// Individual mappings in a migration can be linked to a ticket or issue
// in an external tracking system. Define the URL pattern here in the shared
// class with ':id:' representing the position of the issue number, then add
// ->issueNumber(1234) to a mapping.
$this->issuePattern = 'http://drupal.org/node/:id:';
}