You are here

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

Same name and namespace in other branches
  1. 8.2 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 199

Class

Eva
The plugin that handles an EVA display in views.

Namespace

Drupal\eva\Plugin\views\display

Code

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