You are here

function display_cache_node_type_form in Display Cache 7

Alters the node_type_form form.

Parameters

array $form: The form to alter.

array $form_state: The form state.

1 call to display_cache_node_type_form()
display_cache_form_node_type_form_alter in ./display_cache.module
Implements hook_form_FORM_ID_alter().

File

./display_cache.admin.inc, line 403
Provides the Display Cache administrative interface.

Code

function display_cache_node_type_form(&$form, &$form_state) {
  if (isset($form['comment'])) {
    $form['comment']['display_cache_comment_publication_clears_host_entity_cache'] = array(
      '#description' => t('Should the display cache for this node type be cleared, if a comment is (un-)published or deleted for this node type.<br />
        This could be useful if you use any information about the comments in a view mode.<br />
        <b>Please be aware that on a site with a lot of view modes for this node type and an active community this can have a big perfomance impact.</b>'),
      '#title' => t('Clear host entity display cache on comment (un-)publication/deletion'),
      '#type' => 'checkbox',
      '#default_value' => variable_get('display_cache_comment_publication_clears_host_entity_cache_' . $form['#node_type']->type, FALSE),
    );
  }
}