You are here

public function ReportDate::buildOptionsForm in Commerce Reporting 8

Basic options for all sort criteria

Overrides Date::buildOptionsForm

File

src/Plugin/views/sort/ReportDate.php, line 17

Class

ReportDate
Extends View basic sort handler for dates to add Week granularity.

Namespace

Drupal\commerce_reports\Plugin\views\sort

Code

public function buildOptionsForm(&$form, FormStateInterface $form_state) {
  parent::buildOptionsForm($form, $form_state);
  $form['granularity']['#options']['week'] = $this
    ->t('Week');
}