function StylePluginBase::validate
Same name in other branches
- 9 core/modules/views/src/Plugin/views/style/StylePluginBase.php \Drupal\views\Plugin\views\style\StylePluginBase::validate()
- 8.9.x core/modules/views/src/Plugin/views/style/StylePluginBase.php \Drupal\views\Plugin\views\style\StylePluginBase::validate()
- 10 core/modules/views/src/Plugin/views/style/StylePluginBase.php \Drupal\views\Plugin\views\style\StylePluginBase::validate()
Overrides PluginBase::validate
File
-
core/
modules/ views/ src/ Plugin/ views/ style/ StylePluginBase.php, line 813
Class
- StylePluginBase
- Base class for views style plugins.
Namespace
Drupal\views\Plugin\views\styleCode
public function validate() {
$errors = parent::validate();
if ($this->usesRowPlugin()) {
$plugin = $this->displayHandler
->getPlugin('row');
if (empty($plugin)) {
$errors[] = $this->t('Style @style requires a row style but the row plugin is invalid.', [
'@style' => $this->definition['title'],
]);
}
else {
$result = $plugin->validate();
if (!empty($result) && is_array($result)) {
$errors = array_merge($errors, $result);
}
}
}
return $errors;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.