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

Breadcrumb

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

function Link::toRenderable

Overrides RenderableInterface::toRenderable

File

core/lib/Drupal/Core/Link.php, line 170

Class

Link
Defines an object that holds information about a link.

Namespace

Drupal\Core

Code

public function toRenderable() {
    return [
        '#type' => 'link',
        '#url' => $this->url,
        '#title' => $this->text,
    ];
}

API Navigation

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