You are here

public function CommerceLineItemEntityController::attachLoad in Commerce Core 7

Unserializes the data property of loaded line items.

Overrides DrupalDefaultEntityController::attachLoad

File

modules/line_item/includes/commerce_line_item.controller.inc, line 107
The controller for the line item entity containing the CRUD operations.

Class

CommerceLineItemEntityController
The controller class for line items contains methods for the line item CRUD operations. The load method is inherited from the default controller.

Code

public function attachLoad(&$queried_line_items, $revision_id = FALSE) {
  foreach ($queried_line_items as $line_item_id => &$line_item) {
    $line_item->data = unserialize($line_item->data);
  }

  // Call the default attachLoad() method. This will add fields and call
  // hook_commerce_line_item_load().
  parent::attachLoad($queried_line_items, $revision_id);
}