function imageinfo_cache_create_image_styles_fids in Imageinfo Cache 7.3
Generates all given presets given file ids.
This is mainly used as a wrapper for httprl. $instance_field or $styles needs to be passed to this function as well.
Parameters
array $fids: Array of file IDs.
array $instance_field: (optional) Field info from field_info_instances().
bool $entity_available: (optional) TRUE if coming from entity save.
Return value
array An array of what was done.
2 calls to imageinfo_cache_create_image_styles_fids()
- imageinfo_cache_entity_insert in ./
imageinfo_cache.module - Implements hook_entity_insert().
- imageinfo_cache_file_submit_shutdown in ./
imageinfo_cache.module - Calls the image style generation code.
File
- ./
imageinfo_cache.module, line 529 - Imageinfo Cache module.
Code
function imageinfo_cache_create_image_styles_fids(array $fids, array $instance_field = array(), $entity_available = TRUE) {
$return = array();
$styles = array();
if (module_exists('httprl') && variable_get('imageinfo_cache_use_httprl', IMAGEINFO_CACHE_USE_HTTPRL) && httprl_is_background_callback_capable()) {
// Setup callback options array; call function in the background.
$callback_options = array(
array(
'function' => 'imageinfo_cache_create_image_styles_fids_call',
'blocking' => FALSE,
),
$fids,
$instance_field,
$styles,
$entity_available,
);
// Queue up the request.
httprl_queue_background_callback($callback_options);
// Execute request.
$return = httprl_send_request();
}
else {
$return = imageinfo_cache_create_image_styles_fids_call($fids, $instance_field, $styles, $entity_available);
}
return $return;
}