function icon_bundle_enable in Icon API 8
Same name and namespace in other branches
- 7 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.
2 calls to icon_bundle_enable()
- IconBundleOverviewForm::submitForm in src/
Form/ IconBundleOverviewForm.php - Form submission handler.
- icon_bundle_overview_form_submit in includes/
admin.inc - Submit callback for 'icon_bundle_overview_form'.
File
- ./
icon.module, line 491 - 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['name'],
)));
icon_clear_all_caches();
return TRUE;
}
drupal_set_message(t('An error occurred while attemping to enable the icon bundle: %bundle.', array(
'%bundle' => $bundle['name'],
)), 'error');
return FALSE;
}