function LinkBase::checkUrlAccess

Same name in other branches
  1. 9 core/modules/views/src/Plugin/views/field/LinkBase.php \Drupal\views\Plugin\views\field\LinkBase::checkUrlAccess()
  2. 8.9.x core/modules/views/src/Plugin/views/field/LinkBase.php \Drupal\views\Plugin\views\field\LinkBase::checkUrlAccess()
  3. 10 core/modules/views/src/Plugin/views/field/LinkBase.php \Drupal\views\Plugin\views\field\LinkBase::checkUrlAccess()

Checks access to the link route.

Parameters

\Drupal\views\ResultRow $row: A view result row.

Return value

\Drupal\Core\Access\AccessResultInterface|null The access result, or NULL if the URI elements of the link doesn't exist.

1 call to LinkBase::checkUrlAccess()
LinkBase::render in core/modules/views/src/Plugin/views/field/LinkBase.php
Renders the field.

File

core/modules/views/src/Plugin/views/field/LinkBase.php, line 184

Class

LinkBase
Field handler to present a link to an entity.

Namespace

Drupal\views\Plugin\views\field

Code

protected function checkUrlAccess(ResultRow $row) {
    if ($url = $this->getUrlInfo($row)) {
        return $this->accessManager
            ->checkNamedRoute($url->getRouteName(), $url->getRouteParameters(), $this->currentUser(), TRUE);
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.