Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. LinkApprove.php

function LinkApprove::getUrlInfo

Overrides LinkBase::getUrlInfo

File

core/modules/comment/src/Plugin/views/field/LinkApprove.php, line 21

Class

LinkApprove
Provides a comment approve link.

Namespace

Drupal\comment\Plugin\views\field

Code

protected function getUrlInfo(ResultRow $row) {
    $entity = $this->getEntity($row);
    if (!$entity) {
        return NULL;
    }
    return Url::fromRoute('comment.approve', [
        'comment' => $entity->id(),
    ]);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal