function data_entity_meta_add_defaults in Data 7
Adds our default values to a table's meta information.
5 calls to data_entity_meta_add_defaults()
- data_entity_admin_entity_form in data_entity/
data_entity.admin.inc - Form builder for table entity options.
- data_entity_admin_entity_type_form in data_entity/
data_entity.admin.inc - Form builder for the entity type settings.
- data_entity_entity_edit_form in data_entity/
data_entity.pages.inc - Form builder for viewing and editing a data entity.
- data_entity_entity_info in data_entity/
data_entity.module - Implements hook_entity_info().
- data_entity_update_7000 in data_entity/
data_entity.install - Update the settings on data tables used as entities.
File
- data_entity/
data_entity.module, line 29 - data_entity.module TODO: Enter file description here.
Code
function data_entity_meta_add_defaults(&$meta) {
foreach ($meta['fields'] as $field => $data) {
$meta['fields'][$field] += array(
'locked' => FALSE,
'required' => FALSE,
);
$meta += array(
'label_field' => '',
);
}
$meta += array(
'is_entity_type' => FALSE,
'entity_id' => '',
);
}