You are here

function ctools_image_path in Chaos Tool Suite (ctools) 7

Same name and namespace in other branches
  1. 6 ctools.module \ctools_image_path()

Provide the proper path to an image as necessary.

This helper function is used by ctools but can also be used in other modules in the same way as explained in the comments of ctools_include.

Parameters

$image: The base file name (with extension) of the image to be included.

$module: Optional module containing the include.

$dir: Optional subdirectory containing the include file.

Return value

string A string containing the appropriate path from drupal root.

5 calls to ctools_image_path()
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_ajax_sample_page in ctools_ajax_sample/ctools_ajax_sample.module
Page callback to display links and render a container for AJAX stuff.
ctools_content_admin_icon in includes/content.inc
Get the proper icon path to use, falling back to default icons if no icon exists.
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.
ctools_modal_add_js in includes/modal.inc
@file Implement a modal form using AJAX.

File

./ctools.module, line 185
CTools primary module file.

Code

function ctools_image_path($image, $module = 'ctools', $dir = 'images') {
  return drupal_get_path('module', $module) . "/{$dir}/" . $image;
}