public function ViewUI::buildIdentifier

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.

1 call to ViewUI::buildIdentifier()
ViewUI::addFormToStack in drupal/core/modules/views/views_ui/lib/Drupal/views_ui/ViewUI.php
Add another form to the stack; clicking 'apply' will go to this form rather than closing the ajax popup.

File

drupal/core/modules/views/views_ui/lib/Drupal/views_ui/ViewUI.php, line 793
Definition of Drupal\views_ui\ViewUI.

Class

ViewUI
Stores UI related temporary settings.

Namespace

Drupal\views_ui

Code

public function buildIdentifier($key, $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,
    $this
      ->get('name'),
    $display_id,
  ));
  foreach ($form['args'] as $id) {
    $arg = !empty($args) ? array_shift($args) : NULL;
    $identifier .= '-' . $arg;
  }
  return $identifier;
}