function revision_scheduler_get_all_entity_revision_ids in Revision scheduler 7
Return an array of all the revision IDs of a given entity.
4 calls to revision_scheduler_get_all_entity_revision_ids()
- RevisionSchedulerFunctionalTestCase::testDeletedRevisions in tests/
RevisionSchedulerFunctionalTestCase.test - RevisionSchedulerFunctionalTestCase::testNodeRevisionScheduling in tests/
RevisionSchedulerFunctionalTestCase.test - revision_scheduler_edit_form in ./
revision_scheduler.pages.inc - revision_scheduler_operation_create_access in ./
revision_scheduler.module - Load a single entity with an optional revision ID.
File
- ./
revision_scheduler.module, line 250
Code
function revision_scheduler_get_all_entity_revision_ids($entity_type, $entity_id) {
if (!revision_scheduler_entity_type_has_revisions($entity_type)) {
return array();
}
$info = entity_get_info($entity_type);
$id_key = $info['entity keys']['id'];
$revision_key = $info['entity keys']['revision'];
$query = db_select($info['revision table'], 'revision');
$query
->addField('revision', $revision_key);
$query
->condition('revision.' . $id_key, $entity_id);
return $query
->execute()
->fetchCol();
}