You are here

function _cms_content_sync_add_save_push_action in CMS Content Sync 2.1.x

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

Add "Save and push" action.

_state

Parameters

$form:

$flow_id:

$entity:

1 call to _cms_content_sync_add_save_push_action()
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 539
Module file for cms_content_sync.

Code

function _cms_content_sync_add_save_push_action(&$form, $form_state, $flow_id, $entity) {
  $form_state
    ->setFormState([
    'flow_id' => $flow_id,
  ]);
  $form['actions']['save_push'] = $form['actions']['submit'];
  $form['actions']['save_push']['#value'] = t('Save and push');
  array_push($form['actions']['save_push']['#submit'], '_cms_content_sync_add_save_push_action_submit');
}