Get the first display that is accessible to the user.
array|string $displays: Either a single display id or an array of display ids.
string The first accessible display id, at least default.
public function chooseDisplay($displays) {
if (!is_array($displays)) {
return $displays;
}
$this
->initDisplay();
foreach ($displays as $display_id) {
if ($this->displayHandlers[$display_id]
->access()) {
return $display_id;
}
}
return 'default';
}