function contact_storage_entity_extra_field_info in Contact Storage 8
Implements hook_entity_extra_field_info().
File
- ./
contact_storage.module, line 397 - Contains main module logic.
Code
function contact_storage_entity_extra_field_info() {
$fields = [];
foreach (array_keys(\Drupal::service('entity_type.bundle.info')
->getBundleInfo('contact_message')) as $bundle) {
$fields['contact_message'][$bundle]['form']['preview'] = [
'label' => t('Preview'),
'description' => t('Rendered preview'),
'weight' => 50,
];
}
return $fields;
}