You are here

function hook_pmpapi_pull_docs_prepare_alter in Public Media Platform API Integration 7

Alter pulled docs before they are saved as entities.

Parameters

array $docs: A list of docs that have been pulled, but not saved as entities.

2 invocations of hook_pmpapi_pull_docs_prepare_alter()
PMPAPIDrupalPull::pullDoc in pmpapi_pull/classes/PMPAPIDrupalPull.php
Pulls a single doc from the PMP
PMPAPIDrupalPull::pullDocs in pmpapi_pull/classes/PMPAPIDrupalPull.php
Pulls docs from the PMP

File

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

Code

function hook_pmpapi_pull_docs_prepare_alter(&$docs) {
  foreach ($docs as $i => $doc) {
    if (!empty($doc->pmpapi_do_not_pull)) {
      unset($docs[$i]);
    }
  }
}