You are here

function _cms_content_sync_add_embedded_entity_submit_handler in CMS Content Sync 2.1.x

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

Add a submit handler to the form in case paragraphs are embedded within it.




Return value


1 call to _cms_content_sync_add_embedded_entity_submit_handler()
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.


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


function _cms_content_sync_add_embedded_entity_submit_handler(&$form, &$element) {
  if (!empty($element['cms_content_sync_edit_override']) && $element !== $form) {

    // Submit button is not available yet, so we temporarily store the handler
    // in the form array and set it later when the buttons are available.
    $form['actions']['submit']['#submit'][] = '_cms_content_sync_override_embedded_entity_submit';
    return TRUE;
  foreach ($element as &$item) {
    if (!is_array($item)) {
    if (_cms_content_sync_add_embedded_entity_submit_handler($form, $item)) {
      return TRUE;
  return FALSE;