function _mee_extract_id in Scald: Media Management made easy 7
Extract entity id, sanitizing revision_id if necessary.
4 calls to _mee_extract_id()
- text_field_delete in modules/
fields/ mee/ mee.module - Implements hook_field_delete() on behalf of Text module.
- text_field_insert in modules/
fields/ mee/ mee.module - Implements hook_field_insert() on behalf of Text module.
- text_field_update in modules/
fields/ mee/ mee.module - Implements hook_field_update() on behalf of Text module.
- _mee_load_resources in modules/
fields/ mee/ mee.module - Load used resource in an entity into an array.
File
- modules/
fields/ mee/ mee.module, line 782 - Defines a special textarea, with drag and drop media driven by Scald and dnd.module.
Code
function _mee_extract_id($entity_type, $entity) {
list($entity_id, $revision_id, $bundle) = entity_extract_ids($entity_type, $entity);
// The revision_id is part of the primary key, and thus
// can't be NULL in some databases. Follow Field SQL Storage
// pattern and use the entity_id as a revision_id.
if (!isset($revision_id)) {
$revision_id = $entity_id;
}
return array(
$entity_id,
$revision_id,
);
}