function comment_entity_extra_field_info
comment_entity_extra_field_info()
Implements hook_entity_extra_field_info().
File
- core/modules/comment/comment.module, line 99
- Enables users to comment on published content.
Code
function comment_entity_extra_field_info() { $return = array(); foreach (CommentType::loadMultiple() as $comment_type) { $return['comment'][$comment_type->id()] = array( 'form' => array( 'author' => array( 'label' => t('Author'), 'description' => t('Author textfield'), 'weight' => -2, ), ), ); $return['comment'][$comment_type->id()]['display']['links'] = array( 'label' => t('Links'), 'description' => t('Comment operation links'), 'weight' => 100, 'visible' => TRUE, ); } return $return; }
© 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!modules!comment!comment.module/function/comment_entity_extra_field_info/8.1.x