You are here

public function MessageUiContextualLinkViewMessage::getRouterInfo in Message UI 8

Return the an array with the router ID and message info.

Return value

array Array contains the title and the URL.

Overrides MessageUiViewsContextualLinksInterface::getRouterInfo

File

src/Plugin/MessageUiViewsContextualLinks/MessageUiContextualLinkViewMessage.php, line 69

Class

MessageUiContextualLinkViewMessage
Contextual link to view the message.

Namespace

Drupal\message_ui\Plugin\MessageUiViewsContextualLinks

Code

public function getRouterInfo() {
  return [
    'title' => t('View'),
    'url' => Url::fromRoute('entity.message.canonical', [
      'message' => $this->message
        ->id(),
    ]),
  ];
}