function views_plugin_display::is_identifier_unique

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

plugins/views_plugin_display.inc, line 2969

Class

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

Code

public 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 && $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;
}