function commerce_order_handler_field_order::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/
order/ includes/ views/ handlers/ commerce_order_handler_field_order.inc, line 12 - Contains the basic order field handler.
Class
- commerce_order_handler_field_order
- Field handler to provide simple renderer that allows linking to an order.
Code
function init(&$view, &$options) {
parent::init($view, $options);
if (!empty($this->options['link_to_order']) && in_array($this->options['link_to_order'], array(
'customer',
'admin',
))) {
$this->additional_fields['order_id'] = 'order_id';
$this->additional_fields['uid'] = 'uid';
}
}