1 views_plugin_display.inc views_plugin_display::is_identifier_unique($id, $identifier)

Check if the provided identifier is unique.

Parameters

string $id: The id of the handler which is checked.

string $identifier: The actual get identifier configured in the exposed settings.

Return value

bool: Returns whether the identifier is unique on all handlers.

File

core/modules/views/plugins/views_plugin_display.inc, line 2783
Contains the base display plugin.

Class

views_plugin_display
The default display plugin handler. Display plugins handle options and basic mechanisms for different output methods.

Code

function is_identifier_unique($id, $identifier) {
  foreach (views_object_types() as $type => $info) {
    foreach ($this->get_handlers($type) as $key => $handler) {
      if ($handler->can_expose() && $handler->is_exposed()) {
        if ($handler->is_a_group()) {
          if ($id != $key && isset($handler->options['group_info']['identifier']) && $identifier == $handler->options['group_info']['identifier']) {
            return FALSE;
          }
        }
        else {
          if ($id != $key && isset($handler->options['expose']['identifier']) && $identifier == $handler->options['expose']['identifier']) {
            return FALSE;
          }
        }
      }
    }
  }
  return TRUE;
}