You are here

public static function PriceNumericField::createFromNumericField in Commerce Reporting 8

1 call to PriceNumericField::createFromNumericField()
commerce_reports_views_pre_build in ./commerce_reports.module
Implements hook_views_pre_build().

File

src/Plugin/views/field/PriceNumericField.php, line 17

Class

PriceNumericField
Aggregated price fields have their handler swapped to use this handler in commerce_reports_views_pre_build.

Namespace

Drupal\commerce_reports\Plugin\views\field

Code

public static function createFromNumericField(NumericField $field) {
  $handler = new static($field->configuration, $field->pluginId, $field->definition);
  $handler
    ->init($field->view, $field->displayHandler, $field->options);
  return $handler;
}