You are here

function pmexpense_migrate_create_fields in Drupal PM (Project Management) 8

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

Creates and attaches fields to Drupal user.

2 calls to pmexpense_migrate_create_fields()
pmexpense_install in pmexpense/pmexpense.install
Implements hook_install().
pmexpense_migrate in pmexpense/includes/pmexpense.migrate.inc
Helper function for migrating between pmexpense to drupal fields.

File

pmexpense/includes/pmexpense.migrate.inc, line 53
Migration functions for the PM Expense module.

Code

function pmexpense_migrate_create_fields(&$sandbox) {
  module_load_include('inc', 'pmexpense', 'includes/pmexpense.field_base');
  module_load_include('inc', 'pmexpense', 'includes/pmexpense.field_instance');
  module_load_include('inc', 'pm', 'includes/pm.field');
  $field_bases = pmexpense_default_field_bases();
  pm_field_bases_create_if_required($field_bases);
  $field_instances = pmexpense_default_field_instances();
  pm_field_instances_create_if_required($field_instances);
  return TRUE;
}