You are here

ViewsSort.php in Commerce Invoice 7.2

Provides views sort handler for invoice numbers.

File

src/InvoiceNumber/ViewsSort.php
View source
<?php

/**
 * @file
 * Provides views sort handler for invoice numbers.
 */
namespace Drupal\commerce_invoice\InvoiceNumber;

class ViewsSort extends \views_handler_sort {

  /**
   * {@inheritdoc}
   */
  public function query() {
    $this
      ->ensure_my_table();
    $this->query
      ->add_orderby($this->table_alias, 'number_pattern', $this->options['order']);
    $this->query
      ->add_orderby($this->table_alias, 'number_key', $this->options['order']);
    $this->query
      ->add_orderby($this->table_alias, 'number_sequence', $this->options['order']);
  }

}

Classes

Namesort descending Description
ViewsSort