You are here

function commerce_product_get_properties in Commerce Core 7

Callback for getting product properties.

See also

commerce_product_entity_property_info()

2 string references to 'commerce_product_get_properties'
commerce_product_entity_property_info in modules/product/commerce_product.info.inc
Implements hook_entity_property_info().
commerce_product_ui_entity_property_info_alter in modules/product/commerce_product_ui.info.inc
Implements hook_entity_property_info_alter().

File

modules/product/commerce_product.module, line 715
Defines the core Commerce product entity, including the entity itself, the bundle definitions (product types), and various API functions to manage products and interact with them through forms and autocompletes.

Code

function commerce_product_get_properties($product, array $options, $name) {
  switch ($name) {
    case 'creator':
      return $product->uid;
    case 'edit_url':
      return url('admin/commerce/products/' . $product->product_id . '/edit', $options);
  }
}