You are here

public function Eva::validate in EVA: Entity Views Attachment 8.2

Same name and namespace in other branches
  1. 8 src/Plugin/views/display/Eva.php \Drupal\eva\Plugin\views\display\Eva::validate()

Validate that the plugin is correct and can be saved.

Return value

An array of error strings to tell the user what is wrong with this plugin.

Overrides DisplayPluginBase::validate

File

src/Plugin/views/display/Eva.php, line 285

Class

Eva
The plugin that handles an EVA display in views.

Namespace

Drupal\eva\Plugin\views\display

Code

public function validate() {
  $errors = [];
  if (empty($this
    ->getOption('entity_type'))) {
    $errors[] = $this
      ->t('Display "@display" must be attached to an entity.', [
      '@display' => $this->display['display_title'],
    ]);
  }
  return $errors;
}