function brightcove_field_property_info_callback in Brightcove Video Connect 7.6
Same name and namespace in other branches
- 7.7 brightcove.module \brightcove_field_property_info_callback()
- 7.5 brightcove_field/brightcove_field.module \brightcove_field_property_info_callback()
Callback for generating entity metadata property info.
1 string reference to 'brightcove_field_property_info_callback'
- brightcove_field_info in ./
brightcove.module - Implementation of hook_field_info().
File
- ./
brightcove.module, line 1939 - Brightcove module is an integration layer between any modules using Brightcove API. It makes all necessary checks for the API and makes settings available to the user.
Code
function brightcove_field_property_info_callback(&$info, $entity_type, $field, $instance, $field_type) {
$property =& $info[$entity_type]['bundles'][$instance['bundle']]['properties'][$field['field_name']];
$property['getter callback'] = 'entity_metadata_field_verbatim_get';
$property['setter callback'] = 'entity_metadata_field_verbatim_set';
unset($property['query callback']);
// For formatted text we use the type name 'text_formatted'.
$property['type'] = $field['cardinality'] != 1 ? 'list<brightcove_field>' : 'brightcove_field';
$property['auto creation'] = 'brightcove_field_auto_creation';
$property['property info'] = [
'brightcove_id' => [
'type' => 'integer',
'label' => t('Brightcove ID'),
'sanitized' => TRUE,
'getter callback' => 'entity_property_verbatim_get',
'setter callback' => 'entity_property_verbatim_set',
'setter permission' => 'administer nodes',
'raw getter callback' => 'entity_property_verbatim_get',
],
'player' => [
'type' => 'text',
'label' => t('Player'),
'sanitized' => TRUE,
'getter callback' => 'entity_metadata_field_verbatim_get',
'setter callback' => 'entity_property_verbatim_set',
'setter permission' => 'administer nodes',
'raw getter callback' => 'entity_property_verbatim_get',
],
];
}