class EntitySuggestion in Linkit 8.5
Defines a entity suggestion.
Hierarchy
- class \Drupal\linkit\Suggestion\SimpleSuggestion implements SuggestionInterface
- class \Drupal\linkit\Suggestion\DescriptionSuggestion implements SuggestionDescriptionInterface
- class \Drupal\linkit\Suggestion\EntitySuggestion
- class \Drupal\linkit\Suggestion\DescriptionSuggestion implements SuggestionDescriptionInterface
Expanded class hierarchy of EntitySuggestion
1 file declares its use of EntitySuggestion
- EntityMatcher.php in src/
Plugin/ Linkit/ Matcher/ EntityMatcher.php
File
- src/
Suggestion/ EntitySuggestion.php, line 8
Namespace
Drupal\linkit\SuggestionView source
class EntitySuggestion extends DescriptionSuggestion {
/**
* The entity uuid.
*
* @var string
*/
protected $entityUuid;
/**
* The entity type id.
*
* @var string
*/
protected $entityTypeId;
/**
* The substitution id.
*
* @var string
*/
protected $substitutionId;
/**
* Sets the entity uuid.
*
* @param string $entity_uuid
* The entity uuid.
*
* @return $this
*/
public function setEntityUuid($entity_uuid) {
$this->entityUuid = $entity_uuid;
return $this;
}
/**
* Sets the entity type id.
*
* @param string $entity_type_id
* The entity type id.
*
* @return $this
*/
public function setEntityTypeId($entity_type_id) {
$this->entityTypeId = $entity_type_id;
return $this;
}
/**
* Sets the substitution id.
*
* @param string $substitution_id
* The substitution id.
*
* @return $this
*/
public function setSubstitutionId($substitution_id) {
$this->substitutionId = $substitution_id;
return $this;
}
/**
* {@inheritdoc}
*/
public function jsonSerialize() {
return parent::jsonSerialize() + [
'entity_uuid' => $this->entityUuid,
'entity_type_id' => $this->entityTypeId,
'substitution_id' => $this->substitutionId,
];
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DescriptionSuggestion:: |
protected | property | The suggestion description. | |
DescriptionSuggestion:: |
public | function |
Gets the suggestion description. Overrides SuggestionDescriptionInterface:: |
|
DescriptionSuggestion:: |
public | function |
Sets the suggestion description. Overrides SuggestionDescriptionInterface:: |
|
EntitySuggestion:: |
protected | property | The entity type id. | |
EntitySuggestion:: |
protected | property | The entity uuid. | |
EntitySuggestion:: |
protected | property | The substitution id. | |
EntitySuggestion:: |
public | function |
Overrides DescriptionSuggestion:: |
|
EntitySuggestion:: |
public | function | Sets the entity type id. | |
EntitySuggestion:: |
public | function | Sets the entity uuid. | |
EntitySuggestion:: |
public | function | Sets the substitution id. | |
SimpleSuggestion:: |
protected | property | The suggestion group. | |
SimpleSuggestion:: |
protected | property | The suggestion label. | |
SimpleSuggestion:: |
protected | property | The suggestion path. | |
SimpleSuggestion:: |
public | function |
Gets the suggestion group. Overrides SuggestionInterface:: |
|
SimpleSuggestion:: |
public | function |
Gets the suggestion label. Overrides SuggestionInterface:: |
|
SimpleSuggestion:: |
public | function |
Gets the suggestion path. Overrides SuggestionInterface:: |
|
SimpleSuggestion:: |
public | function |
Sets the suggestion group. Overrides SuggestionInterface:: |
|
SimpleSuggestion:: |
public | function |
Sets the suggestion label. Overrides SuggestionInterface:: |
|
SimpleSuggestion:: |
public | function |
Sets the suggestion path. Overrides SuggestionInterface:: |