You are here

public function DescriptionSuggestion::jsonSerialize in Linkit 8.5

Overrides SimpleSuggestion::jsonSerialize

1 call to DescriptionSuggestion::jsonSerialize()
EntitySuggestion::jsonSerialize in src/Suggestion/EntitySuggestion.php
1 method overrides DescriptionSuggestion::jsonSerialize()
EntitySuggestion::jsonSerialize in src/Suggestion/EntitySuggestion.php

File

src/Suggestion/DescriptionSuggestion.php, line 37

Class

DescriptionSuggestion
Defines a linkit suggestion with description.

Namespace

Drupal\linkit\Suggestion

Code

public function jsonSerialize() {
  return parent::jsonSerialize() + [
    'description' => $this
      ->getDescription(),
  ];
}