You are here

function icon_provider_load in Icon API 7

Same name and namespace in other branches
  1. 8 icon.module \icon_provider_load()

Load a specific provider.

Parameters

string $name: The name of the provider to load.

Return value

array An associative array of provider information as returned from icon_providers().

2 calls to icon_provider_load()
hook_icon_PROVIDER_import_validate in ./icon.api.php
Validate callback for 'hook_icon_PROVIDER_import_process'.
theme_icon_bundle_overview_form in includes/admin.inc
Theme implementation for 'icon_bundle_overview_form'.

File

./icon.module, line 664
icon.module Provides icon integration with menu items.

Code

function icon_provider_load($name) {
  $loaded =& drupal_static(__FUNCTION__, array());
  if (empty($loaded[$name])) {
    if (($cache = cache_get($name, 'cache_icon_providers')) && !empty($cache->data)) {
      $loaded[$name] = $cache->data;
    }
    else {
      $provider = icon_providers($name);
      cache_set($name, $provider, 'cache_icon_providers');
      $loaded[$name] = $provider;
    }
  }
  return $loaded[$name];
}