function LinkReply::getUrlInfo
Same name in other branches
- 8.9.x core/modules/comment/src/Plugin/views/field/LinkReply.php \Drupal\comment\Plugin\views\field\LinkReply::getUrlInfo()
- 10 core/modules/comment/src/Plugin/views/field/LinkReply.php \Drupal\comment\Plugin\views\field\LinkReply::getUrlInfo()
- 11.x core/modules/comment/src/Plugin/views/field/LinkReply.php \Drupal\comment\Plugin\views\field\LinkReply::getUrlInfo()
Overrides LinkBase::getUrlInfo
File
-
core/
modules/ comment/ src/ Plugin/ views/ field/ LinkReply.php, line 21
Class
- LinkReply
- Field handler to present a link to reply to a comment.
Namespace
Drupal\comment\Plugin\views\fieldCode
protected function getUrlInfo(ResultRow $row) {
/** @var \Drupal\comment\CommentInterface $comment */
$comment = $this->getEntity($row);
return Url::fromRoute('comment.reply', [
'entity_type' => $comment->getCommentedEntityTypeId(),
'entity' => $comment->getCommentedEntityId(),
'field_name' => $comment->getFieldName(),
'pid' => $comment->id(),
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.