You are here

function _cms_content_sync_add_form_value_cache in CMS Content Sync 8

Same name and namespace in other branches
  1. 2.1.x cms_content_sync.module \_cms_content_sync_add_form_value_cache()
  2. 2.0.x cms_content_sync.module \_cms_content_sync_add_form_value_cache()

Cache all form values on submission. This is required for sub modules like the sitemap to get values statically from cache per entity type.

_state

Parameters

$form:

1 call to _cms_content_sync_add_form_value_cache()
cms_content_sync_form_alter in ./cms_content_sync.module
1) Make sure the user is informed that content will not only be deleted on this * instance but also on all connected instances if configured that way.

File

./cms_content_sync.module, line 666
Module file for cms_content_sync.

Code

function _cms_content_sync_add_form_value_cache(&$form, $form_state) {

  // Entity form submit handler.
  if (isset($form['actions']['submit'])) {
    if (!empty($form['actions']['submit']['#submit'])) {
      array_unshift($form['actions']['submit']['#submit'], '_cms_content_sync_cache_submit_values');
    }
    else {
      $form['actions']['submit']['#submit'][] = '_cms_content_sync_cache_submit_values';
    }
  }
}