You are here

class MoneyTotal in Ubercart 8.4

Total price field handler.

Displays a price multiplied by the quantity.

Plugin annotation

@ViewsField("uc_order_actions");

Hierarchy

  • class \Drupal\uc_order\Plugin\views\field\MoneyTotal extends \Drupal\uc_order\Plugin\views\field\MoneyAmount

Expanded class hierarchy of MoneyTotal

File

uc_order/src/Plugin/views/field/MoneyTotal.inc, line 14

Namespace

Drupal\uc_order\Plugin\views\field
View source
class MoneyTotal extends MoneyAmount {

  /**
   * {@inheritdoc}
   */
  public function query() {
    $this
      ->ensure_my_table();
    $table = $this->table_alias;
    $field = $this->real_field;
    $params = $this->options['group_type'] != 'group' ? [
      'function' => $this->options['group_type'],
    ] : [];
    $this->field_alias = $this->query
      ->add_field(NULL, "{$table}.{$field} * {$table}.qty", $this->table . '_' . $this->field, $params);
  }

}

Members