function pm_field_bases_create_if_required in Drupal PM (Project Management) 7.2
Same name and namespace in other branches
- 8 includes/pm.field.inc \pm_field_bases_create_if_required()
- 7.3 includes/pm.field.inc \pm_field_bases_create_if_required()
Iterate through an array of field bases, creating if not present.
Parameters
array $field_bases: Array of field bases to check.
Return value
array $result Array of success / failure flags.
10 calls to pm_field_bases_create_if_required()
- pmexpense_migrate_create_fields in pmexpense/
includes/ pmexpense.migrate.inc - Creates and attaches fields to Drupal user.
- pmissue_migrate_create_fields in pmissue/
includes/ pmissue.migrate.inc - Creates and attaches fields to Drupal user.
- pmnote_migrate_create_fields in pmnote/
includes/ pmnote.migrate.inc - Creates and attaches fields to Drupal user.
- pmorganization_migrate_create_fields in pmorganization/
includes/ pmorganization.migrate.inc - Creates and attaches fields to Drupal user.
- pmperson_migrate_create_fields in pmperson/
includes/ pmperson.migrate.inc - Creates and attaches fields to Drupal user.
File
- includes/
pm.field.inc, line 24 - Field creation functions.
Code
function pm_field_bases_create_if_required(array $field_bases) {
$result = array();
if (!empty($field_bases) and is_array($field_bases)) {
foreach ($field_bases as $key => $field_base) {
$field_name = $field_base['field_name'];
$result[$key] = pm_field_base_create_if_required($field_name, $field_base);
}
}
return $result;
}