You are here

function pmnote_migrate_create_fields in Drupal PM (Project Management) 8

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

Creates and attaches fields to Drupal user.

2 calls to pmnote_migrate_create_fields()
pmnote_install in pmnote/pmnote.install
Implements hook_install().
pmnote_migrate in pmnote/includes/pmnote.migrate.inc
Helper function for migrating between pmnote to drupal fields.

File

pmnote/includes/pmnote.migrate.inc, line 52
Migration functions for the PM Note module.

Code

function pmnote_migrate_create_fields(&$sandbox) {
  module_load_include('inc', 'pmnote', 'includes/pmnote.field_base');
  module_load_include('inc', 'pmnote', 'includes/pmnote.field_instance');
  module_load_include('inc', 'pm', 'includes/pm.field');
  $field_bases = pmnote_default_field_bases();
  pm_field_bases_create_if_required($field_bases);
  $field_instances = pmnote_default_field_instances();
  pm_field_instances_create_if_required($field_instances);
  return TRUE;
}