function commerce_file_field_data_property_info in Commerce File 7
Defines info for the properties of the Price field data structure.
1 call to commerce_file_field_data_property_info()
- commerce_file_field_property_info_callback in includes/
commerce_file.field.inc - Callback to alter the property info of price fields.
File
- includes/
commerce_file.field.inc, line 687 - Implement an commerce_file field, based on the file module's file field.
Code
function commerce_file_field_data_property_info($name = NULL) {
return array(
'file' => array(
'label' => t('File'),
'description' => !empty($name) ? t('The file of field %name', array(
'%name' => $name,
)) : '',
'type' => 'file',
'getter callback' => 'entity_metadata_field_file_get',
'setter callback' => 'entity_metadata_field_file_set',
'required' => TRUE,
),
'data' => array(
'label' => t('Data'),
'description' => !empty($name) ? t('License data array of field %name', array(
'%name' => $name,
)) : '',
'type' => 'struct',
'getter callback' => 'entity_property_verbatim_get',
'setter callback' => 'entity_property_verbatim_set',
'property info' => _commerce_file_license_data_property_info(),
),
);
}