<?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);
  }
}