function CommentHooks::entityExtraFieldInfo
Implements hook_entity_extra_field_info().
File
-
core/
modules/ comment/ src/ Hook/ CommentHooks.php, line 73
Class
- CommentHooks
- Hook implementations for comment.
Namespace
Drupal\comment\HookCode
public function entityExtraFieldInfo() {
$return = [];
foreach (CommentType::loadMultiple() as $comment_type) {
$return['comment'][$comment_type->id()] = [
'form' => [
'author' => [
'label' => t('Author'),
'description' => t('Author textfield'),
'weight' => -2,
],
],
];
$return['comment'][$comment_type->id()]['display']['links'] = [
'label' => t('Links'),
'description' => t('Comment operation links'),
'weight' => 100,
'visible' => TRUE,
];
}
return $return;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.