function icon_bundle_enable in Icon API 7
Same name and namespace in other branches
- 8 icon.module \icon_bundle_enable()
Enable the icon bundle that matches {icon_bundle}.name in the database.
Parameters
array $bundle: The icon bundle array.
Return value
bool TRUE if successful, FALSE if the bundle is already enabled or on failure.
1 call to icon_bundle_enable()
- icon_bundle_overview_form_submit in includes/
admin.inc - Submit callback for 'icon_bundle_overview_form'.
File
- ./
icon.module, line 449 - icon.module Provides icon integration with menu items.
Code
function icon_bundle_enable(array $bundle = array()) {
$bundle['status'] = 1;
if (icon_bundle_save($bundle)) {
drupal_set_message(t('The icon bundle %bundle has been enabled.', array(
'%bundle' => $bundle['title'],
)));
icon_clear_all_caches();
return TRUE;
}
drupal_set_message(t('An error occurred while attemping to enable the icon bundle: %bundle.', array(
'%bundle' => $bundle['title'],
)), 'error');
return FALSE;
}