You are here

migrate_extras_profile2.install in Migrate Extras 7.2

File

migrate_extras_examples/migrate_extras_profile2/migrate_extras_profile2.install
View source
<?php

function migrate_extras_profile2_install() {
  $type = entity_create('profile2_type', array(
    'type' => 'migrate_extras_profile2',
    'label' => t('migrate_extras_profile2'),
    'weight' => 0,
    'data' => array(
      'registration' => FALSE,
      'use_page' => TRUE,
    ),
  ));
  $type
    ->save();
}
function migrate_extras_profile2_uninstall() {
  if ($entities = entity_load_multiple_by_name('profile2_type', array(
    'migrate_extras_profile2',
  ))) {
    list($id) = entity_extract_ids('profile2_type', reset($entities));
    entity_delete('profile2_type', $id);
  }
}