You are here

function commerce_product_handler_field_product::init in Commerce Core 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

modules/product/includes/views/handlers/commerce_product_handler_field_product.inc, line 12
Contains the basic product field handler.

Class

commerce_product_handler_field_product
Field handler to provide simple renderer that allows linking to a product.

Code

function init(&$view, &$options) {
  parent::init($view, $options);
  if (!empty($this->options['link_to_product'])) {
    $this->additional_fields['product_id'] = 'product_id';
  }
}