function PMPAPIDrupalPull::alterMappedValues in Public Media Platform API Integration 7
Alter values just prior to mapping.
Parameters
$values array: The values (values, format, timezone) that constitute the local field
$local_field_info array: Info about the local field being mapped to.
$entity object: The entity to which the doc is being mapped.
$profile string: The kind of PMP doc being mapped.
1 call to PMPAPIDrupalPull::alterMappedValues()
- PMPAPIDrupalPull::mapAttribute in pmpapi_pull/
classes/ PMPAPIDrupalPull.php - Maps a doc attribute to an entity.
File
- pmpapi_pull/
classes/ PMPAPIDrupalPull.php, line 370 - Contains PMPAPIDrupalPull.
Class
- PMPAPIDrupalPull
- Turns PMP hypermedia docs in Drupal entities.
Code
function alterMappedValues(&$values, $local_field_info, $entity, $profile) {
switch ($local_field_info['type']) {
case 'date':
case 'datetime':
case 'datestamp':
$mapped_entity = pmpapi_pull_find_mapped_entity($profile);
$entity_type = $mapped_entity['entity_type'];
$bundle_name = $mapped_entity['bundle_name'];
$this
->modifyDate($values, $local_field_info, $entity, $entity_type, $bundle_name);
default:
}
}