public function RssFields::validate in Views RSS 8.2
Same name in this branch
- 8.2 src/Plugin/views/style/RssFields.php \Drupal\views_rss\Plugin\views\style\RssFields::validate()
- 8.2 src/Plugin/views/row/RssFields.php \Drupal\views_rss\Plugin\views\row\RssFields::validate()
Same name and namespace in other branches
- 8.3 src/Plugin/views/style/RssFields.php \Drupal\views_rss\Plugin\views\style\RssFields::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 StylePluginBase::validate
File
- src/
Plugin/ views/ style/ RssFields.php, line 43
Class
- RssFields
- Default style plugin to render an RSS feed from fields.
Namespace
Drupal\views_rss\Plugin\views\styleCode
public function validate() {
$errors = parent::validate();
$plugin = $this->displayHandler
->getPlugin('row');
if ($plugin
->getPluginId() !== 'views_rss_fields') {
$errors[] = $this
->t('Style %style requires an <em>RSS Feed - Fields</em> row plugin.', array(
'%style' => $this->definition['title'],
));
}
return $errors;
}