function views_rss_plugin_style_fields::validate in Views RSS 7.2
Same name and namespace in other branches
- 6.2 views/views_rss_plugin_style_fields.inc \views_rss_plugin_style_fields::validate()
Make sure the display and all associated handlers are valid.
Overrides views_plugin_style::validate
File
- views/
views_rss_plugin_style_fields.inc, line 341 - Extends the view_plugin_style class to provide new RSS view style.
Class
- views_rss_plugin_style_fields
- @file Extends the view_plugin_style class to provide new RSS view style.
Code
function validate() {
parent::validate();
$errors = array();
$channel_elements = views_rss_get('channel_elements');
$item_elements = views_rss_get('item_elements');
if (empty($channel_elements) && empty($item_elements)) {
$errors[] = t('You have not enabled any modules providing feed elements. Please enable at least <a href="@modules_url">Views RSS: Core Elements</a> module.', array(
'@modules_url' => url('admin/modules', array(
'fragment' => 'edit-modules-views',
)),
));
}
return $errors;
}