You are here

function pmpapi_get_eid_from_guid in Public Media Platform API Integration 7

Finds a matching entity id for a given GUID.

Parameters

string $guid: A PMP GUID

Return value

integer/FALSE The entity id of the entity, or FALSE, if no entity exists.

4 calls to pmpapi_get_eid_from_guid()
PMPAPIDrupalPull::addItems in pmpapi_pull/classes/PMPAPIDrupalPull.php
Maps PMP doc items to entity fields.
PMPAPIDrupalPull::pullDocs in pmpapi_pull/classes/PMPAPIDrupalPull.php
Pulls docs from the PMP
PMPAPIDrupalPull::saveEntity in pmpapi_pull/classes/PMPAPIDrupalPull.php
Saves a PMP doc as an entity.
pmpapi_pull_parse_doc_metadata in pmpapi_pull/pmpapi_pull.pages.inc
Parses out metadata from PMP docs.

File

./pmpapi.module, line 511
Creates basic calls to the PMP API.

Code

function pmpapi_get_eid_from_guid($guid) {
  return db_query('SELECT entity_id FROM {pmpapi_local_docs} WHERE guid=:guid', array(
    ':guid' => $guid,
  ))
    ->fetchField();
}