} /**
* {@inheritdoc}
*/
public function validate() { $errors = parent::
validate();
// Do not add errors for the default display if it is not displayed in the
// UI.
if ($this->displayHandler->
isDefaultDisplay() && !\Drupal::
config('views.settings'
)->
get('ui.show.default_display'
)) { return $errors;
} // Ajax errors can cause the plugin to be added without any settings.
$linked_display_id = !
empty($this->options
['display_id'
]) ?
$this->options
['display_id'
] : NULL;
if (!
$linked_display_id) { $errors[] =
$this->
t('%current_display: The link in the %area area has no configured display.',
[ '%current_display' =>
$this->displayHandler->display
['display_title'
],
'%area' =>
$this->areaType,
]);
return $errors;
}