You are here

function hook_pmpapi_pull_default_values_alter in Public Media Platform API Integration 7

Alter default field values before they are attached to an entity and saved.

Parameters

array $values: A list of value(s) for a given field.

string $field_name: The name of the field.

1 invocation of hook_pmpapi_pull_default_values_alter()
PMPAPIDrupalPull::saveEntity in pmpapi_pull/classes/PMPAPIDrupalPull.php
Saves a PMP doc as an entity.

File

pmpapi_pull/pmpapi_pull.api.php, line 48
Hooks provided by the PMPAPI pull module.

Code

function hook_pmpapi_pull_default_values_alter($values, $field_name) {
  if ($field_name == 'slug') {
    $values = array(
      array(
        'value' => t('Urgent'),
      ),
    );
  }
}