You are here

function cloud_zoom_dependency_check in Cloud Zoom 6

Dependency checker. This defines the JQuery Cycle path and a value to determine whether or not it is present.

3 calls to cloud_zoom_dependency_check()
cloud_zoom_admin_overview in ./cloud_zoom.admin.inc
The admin overview page callback - provides a table of fields configured with the cloud_zoom display settings
cloud_zoom_requirements in ./cloud_zoom.install
Implementation of hook_requirements().
theme_cloud_zoom_formatter_imagefield in ./cloud_zoom.theme.inc
Theme handler for the cloud_zoom effect

File

./cloud_zoom.common.inc, line 12
cloud_zoom.common.inc This file contains functions common to the module and install file

Code

function cloud_zoom_dependency_check() {
  static $result = NULL;
  if (isset($result)) {
    return $result;
  }

  // Ensure Libraries module file is present. There is a risk, without this,
  // that if libraries is being installed 'parallel' to Cloud Zoom then
  // Drupal may not have included the .module file yet
  module_load_include('module', 'libraries');
  $path = module_invoke('libraries', 'get_path', 'cloud_zoom');
  $filepath = $path . '/cloud-zoom.1.0.2.min.js';
  $result = array(
    'path' => $path,
    'filepath' => $filepath,
    'exists' => is_dir($path) && is_file($filepath),
  );
  return $result;
}