function views_plugin_display::is_identifier_unique

Same name in other branches
  1. 7.x-3.x plugins/views_plugin_display.inc \views_plugin_display::is_identifier_unique()

Check if the provided identifier is unique.

File

plugins/views_plugin_display.inc, line 2538

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 ($id != $key && $identifier == $handler->options['expose']['identifier']) {
                    return FALSE;
                }
            }
        }
    }
    return TRUE;
}