You are here

function icon_bundle_disable in Icon API 8

Same name and namespace in other branches
  1. 7 icon.module \icon_bundle_disable()

Disable 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 disabled or on failure.

2 calls to icon_bundle_disable()
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 471
icon.module Provides icon integration with menu items.

Code

function icon_bundle_disable(array $bundle = array()) {
  $bundle['status'] = 0;
  if (icon_bundle_save($bundle)) {
    drupal_set_message(t('The icon bundle %bundle has been disabled.', array(
      '%bundle' => $bundle['name'],
    )));
    icon_clear_all_caches();
    return TRUE;
  }
  drupal_set_message(t('An error occurred while attemping to disable the icon bundle: %bundle.', array(
    '%bundle' => $bundle['name'],
  )), 'error');
  return FALSE;
}