function Date::default_argument_form in Views (for Drupal 7) 8.3
Add an option to set the default value to the current date.
Overrides ArgumentPluginBase::default_argument_form
File
- lib/
Drupal/ views/ Plugin/ views/ argument/ Date.php, line 42 - Definition of Drupal\views\Plugin\views\argument\Date.
Class
- Date
- Abstract argument handler for dates.
Namespace
Drupal\views\Plugin\views\argumentCode
function default_argument_form(&$form, &$form_state) {
parent::default_argument_form($form, $form_state);
$form['default_argument_type']['#options'] += array(
'date' => t('Current date'),
);
$form['default_argument_type']['#options'] += array(
'node_created' => t("Current node's creation time"),
);
$form['default_argument_type']['#options'] += array(
'node_changed' => t("Current node's update time"),
);
}