public function CommerceProductEntityController::attachLoad in Commerce Core 7
Unserializes the data property of loaded products.
Overrides DrupalDefaultEntityController::attachLoad
File
- modules/
product/ includes/ commerce_product.controller.inc, line 128 - The controller for the product entity containing the CRUD operations.
Class
- CommerceProductEntityController
- The controller class for products contains methods for the product CRUD operations.
Code
public function attachLoad(&$queried_products, $revision_id = FALSE) {
foreach ($queried_products as $product_id => &$product) {
$product->data = unserialize($product->data);
}
// Call the default attachLoad() method. This will add fields and call
// hook_commerce_product_load().
parent::attachLoad($queried_products, $revision_id);
}