function title_form_entity_view_display_edit_form_alter in Title 8.2
Implements hook_form_alter().
File
- ./
title.module, line 76 - Convert titles into fields which can be display manipulated.
Code
function title_form_entity_view_display_edit_form_alter(&$form, FormStateInterface $form_state, $form_id) {
if ($form['#entity_type'] !== 'node') {
return;
}
$config_manager = \Drupal::service('title.config_manager');
// Since a renderable title needs to be enabled at the entity level, hide the
// title field manually for bundles which aren't using a display configurable
// title.
if (!$config_manager
->getEnabled($form['#bundle'])) {
unset($form['fields']['title']);
}
}