function date_navigation_plugin_style::validate in Date 6
Same name and namespace in other branches
- 6.2 includes/date_navigation_plugin_style.inc \date_navigation_plugin_style::validate()
- 7 date_views/includes/date_navigation_plugin_style.inc \date_navigation_plugin_style::validate()
Style validation.
File
- ./
date_api.views.inc, line 453 - Defines date-related Views data and plugins:
Class
- date_navigation_plugin_style
- Style plugin to create date back/next navigation.
Code
function validate() {
$errors = parent::validate();
$arguments = $this->display->handler
->get_option('arguments');
if (!in_array('date_argument', array_keys($arguments))) {
$errors[] = t('The @style requires the Calendar: Date argument.', array(
'@style' => $this->definition['title'],
));
}
else {
if ($arguments['date_argument']['default_argument_type'] != 'date') {
$errors[] = t('The @style requires the Calendar: Date argument to provide a default argument set to default to the current date.', array(
'@style' => $this->definition['title'],
));
}
}
return $errors;
}