1 views_ui.admin.inc views_ui_build_identifier($key, $view, $display_id, $args)

Build a form identifier that we can use to see if one form is the same as another. Since the arguments differ slightly we do a lot of spiffy concatenation here.

File

core/modules/views_ui/views_ui.admin.inc, line 2777
Admin page callbacks for the Views UI module.

Code

function views_ui_build_identifier($key, $view, $display_id, $args) {
  $form = views_ui_ajax_forms($key);
  // Automatically remove the single-form cache if it exists and
  // does not match the key.
  $identifier = implode('-', array($key, $view->name, $display_id));

  foreach ($form['args'] as $id) {
    $arg = (!empty($args)) ? array_shift($args) : NULL;
    $identifier .= '-' . $arg;
  }
  return $identifier;
}