You are here

function pmperson_migrate_create_fields in Drupal PM (Project Management) 8

Same name and namespace in other branches
  1. 7.3 pmperson/includes/pmperson.migrate.inc \pmperson_migrate_create_fields()
  2. 7.2 pmperson/includes/pmperson.migrate.inc \pmperson_migrate_create_fields()

Creates and attaches fields to Drupal user.

2 calls to pmperson_migrate_create_fields()
pmperson_install in pmperson/pmperson.install
Implements hook_install().
pmperson_migrate in pmperson/includes/pmperson.migrate.inc
Helper function for migrating between PM Person nodes and Drupal users.

File

pmperson/includes/pmperson.migrate.inc, line 520
Migration functions for the PM Person module.

Code

function pmperson_migrate_create_fields(&$sandbox) {
  module_load_include('inc', 'pmperson', 'includes/pmperson.field_base');
  module_load_include('inc', 'pmperson', 'includes/pmperson.field_instance');
  module_load_include('inc', 'pm', 'includes/pm.field');
  $field_bases = pmperson_default_field_bases();
  pm_field_bases_create_if_required($field_bases);
  $field_instances = pmperson_default_field_instances();
  pm_field_instances_create_if_required($field_instances);
  $sandbox['pmperson_fields_and_instance_created'] = TRUE;
  return TRUE;
}