function views_plugin_style::validate
Validate that the plugin is correct and can be saved.
Return value
array An array of error strings to tell the user what is wrong with this plugin.
Overrides views_plugin::validate
File
-
plugins/
views_plugin_style.inc, line 609
Class
- views_plugin_style
- Base class to define a style plugin handler.
Code
public function validate() {
$errors = parent::validate();
if ($this->uses_row_plugin()) {
$plugin = $this->display->handler
->get_plugin('row');
if (empty($plugin)) {
$errors[] = t('Style @style requires a row style but the row plugin is invalid.', array(
'@style' => $this->definition['title'],
));
}
else {
$result = $plugin->validate();
if (!empty($result) && is_array($result)) {
$errors = array_merge($errors, $result);
}
}
}
return $errors;
}