Overrides \Drupal\views\Plugin\views\display\DisplayPluginBase::validate().
Overrides DisplayPluginBase::validate
public function validate() {
$errors = parent::validate();
$menu = $this
->getOption('menu');
if (!empty($menu['type']) && $menu['type'] != 'none' && empty($menu['title'])) {
$errors[] = t('Display @display is set to use a menu but the menu link text is not set.', array(
'@display' => $this->display['display_title'],
));
}
if ($menu['type'] == 'default tab') {
$tab_options = $this
->getOption('tab_options');
if (!empty($tab_options['type']) && $tab_options['type'] != 'none' && empty($tab_options['title'])) {
$errors[] = t('Display @display is set to use a parent menu but the parent menu link text is not set.', array(
'@display' => $this->display['display_title'],
));
}
}
return $errors;
}