You are here

function pmorganization_migrate_create_fields in Drupal PM (Project Management) 7.2

Same name and namespace in other branches
  1. 8 pmorganization/includes/pmorganization.migrate.inc \pmorganization_migrate_create_fields()
  2. 7.3 pmorganization/includes/pmorganization.migrate.inc \pmorganization_migrate_create_fields()

Creates and attaches fields to Drupal user.

2 calls to pmorganization_migrate_create_fields()
pmorganization_install in pmorganization/pmorganization.install
Implements hook_install().
pmorganization_migrate in pmorganization/includes/pmorganization.migrate.inc
Helper function for migrating between pmorganization to drupal fields.

File

pmorganization/includes/pmorganization.migrate.inc, line 53
Migration functions for the PM Organization module.

Code

function pmorganization_migrate_create_fields(&$sandbox) {
  module_load_include('inc', 'pmorganization', 'includes/pmorganization.field_base');
  module_load_include('inc', 'pmorganization', 'includes/pmorganization.field_instance');
  module_load_include('inc', 'pm', 'includes/pm.field');
  $field_bases = pmorganization_default_field_bases();
  pm_field_bases_create_if_required($field_bases);
  $field_instances = pmorganization_default_field_instances();
  pm_field_instances_create_if_required($field_instances);
  return TRUE;
}