You are here

function migrate_example_wine_content_types in Migrate 6.2

Same name and namespace in other branches
  1. 7.2 migrate_example/wine.install.inc \migrate_example_wine_content_types()
1 call to migrate_example_wine_content_types()
migrate_example_wine_install in migrate_example/wine.install.inc

File

migrate_example/wine.install.inc, line 627
Set up for the wine (advanced) example.

Code

function migrate_example_wine_content_types() {

  // This code based on from standard.profile.
  // Insert default user-defined node types into the database.
  $types = array();
  $types[] = array(
    'type' => 'migrate_example_wine',
    'name' => st('Wine'),
    'module' => 'node',
    'description' => st("Wine is what we drink."),
    'custom' => 1,
    'modified' => 1,
    'locked' => 1,
  );
  $types[] = array(
    'type' => 'migrate_example_producer',
    'name' => st('Wine Producer'),
    'module' => 'node',
    'description' => st("Wineries, vineyards, and large producers"),
    'custom' => 1,
    'modified' => 1,
    'locked' => 1,
  );
  foreach ($types as $type) {
    $type = node_type_set_defaults($type);
    node_type_save($type);
  }
}