Check if the provided identifier is unique.
string $id: The id of the handler which is checked.
string $identifier: The actual get identifier configured in the exposed settings.
bool Returns whether the identifier is unique on all handlers.
public function isIdentifierUnique($id, $identifier) {
foreach (ViewExecutable::viewsHandlerTypes() as $type => $info) {
foreach ($this
->getHandlers($type) as $key => $handler) {
if ($handler
->canExpose() && $handler
->isExposed()) {
if ($handler
->isAGroup()) {
if ($id != $key && $identifier == $handler->options['group_info']['identifier']) {
return FALSE;
}
}
else {
if ($id != $key && $identifier == $handler->options['expose']['identifier']) {
return FALSE;
}
}
}
}
}
return TRUE;
}