You are here

public function TokenAuthUser::link in Simple OAuth (OAuth2) & OpenID Connect 8

Same name and namespace in other branches
  1. 8.4 src/Authentication/TokenAuthUser.php \Drupal\simple_oauth\Authentication\TokenAuthUser::link()
  2. 8.2 src/Authentication/TokenAuthUser.php \Drupal\simple_oauth\Authentication\TokenAuthUser::link()
  3. 8.3 src/Authentication/TokenAuthUser.php \Drupal\simple_oauth\Authentication\TokenAuthUser::link()
  4. 5.x src/Authentication/TokenAuthUser.php \Drupal\simple_oauth\Authentication\TokenAuthUser::link()

Deprecated way of generating a link to the entity. See toLink().

Parameters

string|null $text: (optional) The link text for the anchor tag as a translated string. If NULL, it will use the entity's label. Defaults to NULL.

string $rel: (optional) The link relationship type. Defaults to 'canonical'.

array $options: See \Drupal\Core\Routing\UrlGeneratorInterface::generateFromRoute() for the available options.

Return value

string An HTML string containing a link to the entity.

Overrides EntityInterface::link

Deprecated

in drupal:8.0.0 and is removed from drupal:9.0.0. Use \Drupal\Core\EntityInterface::toLink()->toString() instead.

See also

https://www.drupal.org/node/2614344

\Drupal\Core\Entity\EntityInterface::toLink()

File

src/Authentication/TokenAuthUser.php, line 283

Class

TokenAuthUser
Class TokenAuthUser.

Namespace

Drupal\simple_oauth\Authentication

Code

public function link($text = NULL, $rel = 'canonical', array $options = []) {
  return $this->subject
    ->link($text, $rel, $options);
}