You are here

function commerce_invoice_handler_field_invoice::init in Commerce Invoice 7

Init the handler with necessary data.

Parameters

view $view: The $view object this handler is attached to.

array $options: The item from the database; the actual contents of this will vary based upon the type of handler.

Overrides views_handler_field::init

File

includes/views/handlers/commerce_invoice_handler_field_invoice.inc, line 12
Contains the basic invoice field handler.

Class

commerce_invoice_handler_field_invoice
Field handler to provide simple renderer that allows linking to an invoice.

Code

function init(&$view, &$options) {
  parent::init($view, $options);
  if (!empty($this->options['link_to_invoice']) && in_array($this->options['link_to_invoice'], array(
    'customer',
    'admin',
  ))) {
    $this->additional_fields['invoice_id'] = 'invoice_id';
    $this->additional_fields['uid'] = 'uid';
    $this->additional_fields['order_id'] = 'order_id';
  }
}