function icon_providers_support_import in Icon API 8
Same name and namespace in other branches
- 7 icon.module \icon_providers_support_import()
Returns information about whether a provider supports importing.
@todo make this "JSON importing"?
Parameters
string $name: The name of the provider to load.
Return value
array|false Returns an array of providers that support importing or just $name if it was provided. Returns FALSE if there are no providers or specific $name does not exist.
1 call to icon_providers_support_import()
- icon_provider_import_form in includes/
import.inc - Menu callback for 'icon_provider_import_form'.
File
- ./
icon.module, line 682 - icon.module Provides icon integration with menu items.
Code
function icon_providers_support_import($name = NULL) {
$providers =& drupal_static(__FUNCTION__);
if (!isset($providers)) {
$providers = array();
foreach (icon_providers() as $provider) {
if (icon_extension_hook($provider['type'], $provider[$provider['type']], 'icon_' . $provider['name'] . '_import_validate') && icon_extension_hook($provider['type'], $provider[$provider['type']], 'icon_' . $provider['name'] . '_import_process')) {
$providers[$provider['name']] = $provider;
}
}
}
if (!empty($name)) {
if (!empty($providers[$name])) {
return $providers[$name];
}
return FALSE;
}
return $providers;
}