protected function AjaxCommentsController::renderCommentField in Open Social 10.0.x
Same name and namespace in other branches
- 10.3.x modules/custom/social_ajax_comments/src/Controller/AjaxCommentsController.php \Drupal\social_ajax_comments\Controller\AjaxCommentsController::renderCommentField()
- 10.1.x modules/custom/social_ajax_comments/src/Controller/AjaxCommentsController.php \Drupal\social_ajax_comments\Controller\AjaxCommentsController::renderCommentField()
- 10.2.x modules/custom/social_ajax_comments/src/Controller/AjaxCommentsController.php \Drupal\social_ajax_comments\Controller\AjaxCommentsController::renderCommentField()
1 call to AjaxCommentsController::renderCommentField()
- SocialPostAlbumAjaxCommentsController::socialAdd in modules/
social_features/ social_post/ modules/ social_post_album/ src/ Controller/ SocialPostAlbumAjaxCommentsController.php - Builds ajax response for adding a new comment without a parent comment.
File
- modules/
custom/ social_ajax_comments/ src/ Controller/ AjaxCommentsController.php, line 245
Class
- AjaxCommentsController
- Controller routines for AJAX comments routes.
Namespace
Drupal\social_ajax_comments\ControllerCode
protected function renderCommentField(EntityInterface $entity, $field_name) {
$comment_display = parent::renderCommentField($entity, $field_name);
$parameters =& $comment_display[0]['comments']['pager']['#route_parameters'];
$parameters['entity_type'] = $entity
->getEntityTypeId();
$parameters['entity'] = $entity
->id();
$parameters['field_name'] = $field_name;
$parameters['pid'] = $this->pid;
return $comment_display;
}