function devel_image_provider_generate in Devel images provider 7
Same name and namespace in other branches
- 8 devel_image_provider.module \devel_image_provider_generate()
Helper function that takes care of redirecting the generation to the right provider.
1 string reference to 'devel_image_provider_generate'
- devel_image_provider_providers_form in ./
devel_image_provider.module - Admin settings form.
File
- ./
devel_image_provider.module, line 132 - Module file that exposes the options to select an external image provider to generate images.
Code
function devel_image_provider_generate($object, $field, $instance, $bundle) {
ctools_include('plugins');
$provider = variable_get('devel_image_provider_method_selected', array());
$plugin = ctools_get_plugins('devel_image_provider', 'provider', $provider);
$class = ctools_plugin_get_class($plugin, 'class');
if (class_exists($class)) {
$class = new $class($plugin);
return $class
->generateImage($object, $field, $instance, $bundle);
}
}