function ctools_modal_image_button in Chaos Tool Suite (ctools) 7
Same name and namespace in other branches
- 6 includes/modal.inc \ctools_modal_image_button()
Render an image as a button link. This will automatically apply an AJAX class to the link and add the appropriate javascript to make this happen.
Parameters
$image: The path to an image to use that will be sent to theme('image') for rendering.
$dest: The destination of the link.
$alt: The alt text of the link.
$class: Any class to apply to the link. @todo this should be a options array.
2 calls to ctools_modal_image_button()
- ctools_access_admin_render_table in includes/
context-access-admin.inc - Render the table. This is used both to render it initially and to rerender it upon ajax response.
- ctools_context_add_item_to_form in includes/
context-admin.inc - Add a row to the form. Used both in the main form and by the ajax to add an item.
File
- includes/
modal.inc, line 164 - Implement a modal form using AJAX.
Code
function ctools_modal_image_button($image, $dest, $alt, $class = '') {
return ctools_ajax_text_button(theme('image', array(
'path' => $image,
)), $dest, $alt, $class, 'ctools-use-modal');
}