function commerce_option_entity_property_info in Commerce Product Option 7.2
Implements hook_entity_property_info().
File
- ./
commerce_option.module, line 118
Code
function commerce_option_entity_property_info() {
$info = array();
$info['commerce_option']['properties'] = array(
'option_id' => array(
'type' => 'integer',
'label' => t('Option id'),
'schema field' => 'option_id',
),
'set_id' => array(
'type' => 'text',
'label' => t('Set id'),
'schema field' => 'set_id',
'setter callback' => 'entity_property_verbatim_set',
'required' => TRUE,
),
'product_id' => array(
'type' => 'integer',
'label' => t('Product id'),
'schema field' => 'product_id',
'required' => TRUE,
),
'line_item_id' => array(
'type' => 'integer',
'label' => t('Line item id'),
'schema_field' => 'line_item_id',
'setter callback' => 'entity_property_verbatim_set',
'required' => TRUE,
),
'created' => array(
'type' => 'date',
'label' => t('Created date'),
'schema_field' => 'created',
'setter callback' => 'entity_property_verbatim_set',
),
'changed' => array(
'type' => 'date',
'label' => t('Changed date'),
'schema_field' => 'changed',
'setter callback' => 'entity_property_verbatim_set',
),
);
$info['commerce_option_set']['properties'] = array(
'option_set_id' => array(
'type' => 'integer',
'label' => t('Option set id'),
'schema field' => 'option_set_id',
'required' => TRUE,
),
'set_id' => array(
'type' => 'text',
'label' => t('Machine name'),
'schema field' => 'set_id',
'required' => TRUE,
),
'name' => array(
'type' => 'text',
'label' => t('Human-readable name'),
'schema field' => 'name',
'required' => TRUE,
),
);
return $info;
}