hook_entity_extra_field_info_alter(&$info)
Alter "pseudo-field" components on content entities.
array $info: The array structure is identical to that of the return value of \Drupal\Core\Entity\EntityManagerInterface::getExtraFields().
hook_entity_extra_field_info()
function hook_entity_extra_field_info_alter(&$info) { // Force node title to always be at the top of the list by default. foreach (NodeType::loadMultiple() as $bundle) { if (isset($info['node'][$bundle->id()]['form']['title'])) { $info['node'][$bundle->id()]['form']['title']['weight'] = -20; } } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Entity!entity.api.php/function/hook_entity_extra_field_info_alter/8.1.x