예제 #1
0
/**
 * Allows defaults to be set on all RemoteEntityQueries for an entity type.
 *
 * @param RemoteEntityQuery $query
 *  A RemoteEntityQuery, with the base already set by the entity controller.
 *  This is passed by reference and should be altered directly.
 *  The entity info for the base entity can be found in $query->entity_info.
 *
 * @see remote_entity_hook_entity_info()
 * @see RemoteEntityAPIDefaultController::getRemoteEntityQuery()
 */
function callback_remote_entity_query_defaults($query)
{
    // We only work with remote entities of property foo equal to bar.
    $query->fieldRemoteCondition('foo', 'bar');
}