You are here

protected function field_timer_county_base::loadLibrary in Field Timer 7.2

@inheritdoc

Overrides field_timer_formatter_js_base::loadLibrary

1 call to field_timer_county_base::loadLibrary()
field_timer_county_base::renderItems in includes/field_timer_county.inc
@inheritdoc

File

includes/field_timer_county.inc, line 170
Help file. Contains help classes to perform field_timer_county formatter related actions.

Class

field_timer_county_base
Base class for field_timer_county formatter.

Code

protected function loadLibrary() {
  if (!$this->library_loaded) {
    $library = libraries_load('county');
    $this->library_loaded = $library && !empty($library['loaded']);
    $js_name = 'county.js';
    $base_path = 'sites/all/libraries/county';
    if (!$this->library_loaded) {
      drupal_set_message(t("Can't load County library. Please download !url jQuery plugin and extract it to @path, so @js can be found at @full_path.", array(
        '!url' => l(t('County'), 'http://www.egrappler.com/free-jquery-count-down-plugin-county/', array(
          'absolute' => TRUE,
        )),
        '@path' => $base_path,
        '@js' => $js_name,
        '@full_path' => $base_path . '/js/' . $js_name,
      )), 'error');
    }
  }
  return $this->library_loaded;
}