You are here

function mongodb_block_ui_form_system_performance_settings_alter in MongoDB 7

Implements hook_form_FORM_ID_alter().

File

mongodb_block_ui/mongodb_block_ui.module, line 258
Controls the visual building mongodb_block_uis a page is constructed with.

Code

function mongodb_block_ui_form_system_performance_settings_alter(&$form, &$form_state) {
  $disabled = count(module_implements('node_grants'));
  $form['caching']['block_cache'] = array(
    '#type' => 'checkbox',
    '#title' => t('Cache blocks'),
    // phpcs:ignore
    '#default_value' => variable_get('block_cache', FALSE),
    '#disabled' => $disabled,
    '#description' => $disabled ? t('Block caching is inactive because you have enabled modules defining content access restrictions.') : NULL,
    '#weight' => -1,
  );
}