function profile_entity_form_display_alter in Profile 8
Implements hook_entity_form_display_alter().
File
- ./
profile.module, line 199 - Support for configurable user profiles.
Code
function profile_entity_form_display_alter(EntityFormDisplayInterface $form_display, array $context) {
if ($context['entity_type'] !== 'profile') {
return;
}
$profile_type_id = $context['bundle'];
$entity_type_bundle_info = \Drupal::service('entity_type.bundle.info');
$bundle_info = $entity_type_bundle_info
->getBundleInfo('profile');
if (empty($bundle_info[$profile_type_id]['revision_ui'])) {
$form_display
->removeComponent('revision_log_message');
}
}