You are here

public function ShipmentId::init in Ubercart 8.4

Overrides init function to provide generic option to link to shipment.

Overrides FieldPluginBase::init

File

shipping/uc_fulfillment/src/Plugin/views/field/ShipmentId.php, line 24

Class

ShipmentId
Field handler: simple renderer that links to the shipment page.

Namespace

Drupal\uc_fulfillment\Plugin\views\field

Code

public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL) {
  parent::init($view, $display, $options);
  if (!empty($this->options['link_to_shipment'])) {
    $this->additional_fields['order_id'] = [
      'table' => $this->table_alias,
      'field' => 'order_id',
    ];
  }
}