Link
class Link
Provides a link render element.
Properties:
- #title: The link text.
- #url: \Drupal\Url object containing URL information pointing to a internal or external link . See \Drupal\Core\Utility\LinkGeneratorInterface.
Usage example:
$build['examples_link'] = [ '#title' => $this->t('Examples'), '#type' => 'link', '#url' => Url::fromRoute('examples.description') ];
Plugin annotation
@RenderElement("link")
Hierarchy
- class \Drupal\Component\Plugin\登录查看完整内容