Experimental project

This is a sandbox project, which contains experimental code for developer use only.

Similar to https://drupal.org/project/efq_extra_field but need a place for the code to live for now until I'm able to contact the maintainers about https://drupal.org/node/2208439

Also checkout https://www.drupal.org/project/views_fast_field

Usage:

  $uid = 8;
  $query = new EntityFieldQueryExtra();
  $query
    ->entityCondition('entity_type', 'node')
    ->entityCondition('bundle', 'video')
    ->propertyCondition('uid', $uid)
    // Default join is a LEFT.
    ->getFieldValue('field_video_script_approved', 'value')
    ->getFieldValue('field_video_script', 'value')
    ->getFieldValue('field_video_raw_file', 'fid')
    ->getFieldValue('field_video_voice_talent', 'tid')
    // This will do an inner join on the field_video_file table.
    ->getFieldValue('field_video_file', 'fid', 'INNER')
    // Get the node status.
    ->getPropertyValue('status')
    // Output query ready to be ran in MySQL under the #query key.
    ->showQuery()
    ->addTag('DANGEROUS_ACCESS_CHECK_OPT_OUT');
  $results = $query->execute();
// Run entity_load on every entity returned.
$query->executeEntityLoad();

// Format results to look similar to an entity_load.
$query->executeEntityBuild();

// Do not run entity_load but results will be very similar to entity_load.
$query->executeEntityBuildAll();

// Print the query ready to be ran in MySQL; helpful when exceptions are thrown.
->printQuery()

// Output query ready to be ran in MySQL under the #query key.
->showQuery()

// Get the entity status.
->getPropertyValue('status')

// Get the entity users roles.
->getPropertyValue('roles')

// Set role name condition.
->propertyCondition('rolename', 'business owner')

// Set role id condition.
->propertyCondition('rid', array(1, 2, 4))
Supporting organizations: 
Paid for mikeytown2 to develop & maintain this module

Project information