function quicktabs_style_plugin::validate in Quick Tabs 6.2
Same name and namespace in other branches
- 6.3 includes/quicktabs_style_plugin.inc \quicktabs_style_plugin::validate()
- 7.3 includes/quicktabs_style_plugin.inc \quicktabs_style_plugin::validate()
File
- includes/
quicktabs_style_plugin.inc, line 51 - Add Quicktabs style plugins to Views.
Class
- quicktabs_style_plugin
- Style plugin to display Quicktabs.
Code
function validate() {
$errors = parent::validate();
// Ensure that we're using the field row style.
if (!$this->row_plugin
->uses_fields()) {
$errors[] = t('Display "@display" uses the "@style" row style, but the Quicktabs display style requires use of the "Fields" row style.', array(
'@display' => $this->display->display_title,
'@style' => $this->row_plugin->definition['title'],
));
}
// Ensure that a valid tab title field is selected.
$fields = $this->display->handler
->get_handlers('field');
if (empty($this->options['tab_title_field']) || !isset($fields[$this->options['tab_title_field']])) {
$errors[] = t('The Quicktabs display style requires that a field be configured to be used as the tab title.');
}
return $errors;
}