You are here

public function Date::defaultArgumentForm in Views XML Backend 8

Add an option to set the default value to the current date.

Overrides Date::defaultArgumentForm

File

src/Plugin/views/argument/Date.php, line 54
Contains \Drupal\views_xml_backend\Plugin\views\argument\Date.

Class

Date
Date XML argument handler.

Namespace

Drupal\views_xml_backend\Plugin\views\argument

Code

public function defaultArgumentForm(&$form, FormStateInterface $form_state) {
  parent::defaultArgumentForm($form, $form_state);
  unset($form['default_argument_type']['#options']['node_changed']);
  unset($form['default_argument_type']['#options']['node_created']);
}