You are here

function slickgrid_plugin_inline_cell_process in Slickgrid 7

Same name and namespace in other branches
  1. 7.2 plugins/editors/InlineCell.inc \slickgrid_plugin_inline_cell_process()

Process the inline cell update callback

Parameters

object $editor:

1 string reference to 'slickgrid_plugin_inline_cell_process'
InlineCell.inc in plugins/editors/InlineCell.inc
Provides an inline cell editor

File

plugins/editors/InlineCell.inc, line 32
Provides an inline cell editor

Code

function slickgrid_plugin_inline_cell_process($editor) {
  $_POST['op'] = t('Save');
  $entity = current($editor->entities);
  $langcode = field_language($editor->entity_type, $entity, $editor->field_id);
  $_POST[$editor->field_id][$langcode] = array(
    array(
      'value' => $_POST['value'],
    ),
  );
  $form_state['programmed'] = true;

  // Additional form_state settings required for ctools modal forms
  $editor->entity_info = entity_get_info($editor->entity_type);
  $form_state['values'] = $_POST;
  $form_state['editor'] = $editor;

  // Form isn't being displayed - so no rendering or redirecting
  $form_state['re_render'] = true;
  $form_state['no_redirect'] = true;

  // Build & submit the form
  drupal_build_form('slickgrid_editor_form', $form_state);
}