class SimpleSuggestion in Linkit 8.5
Defines a simple suggestion.
Hierarchy
- class \Drupal\linkit\Suggestion\SimpleSuggestion implements SuggestionInterface
Expanded class hierarchy of SimpleSuggestion
1 file declares its use of SimpleSuggestion
- DummyMatcher.php in tests/
linkit_test/ src/ Plugin/ Linkit/ Matcher/ DummyMatcher.php
File
- src/
Suggestion/ SimpleSuggestion.php, line 8
Namespace
Drupal\linkit\SuggestionView source
class SimpleSuggestion implements SuggestionInterface {
/**
* The suggestion label.
*
* @var string
*/
protected $label;
/**
* The suggestion path.
*
* @var string
*/
protected $path;
/**
* The suggestion group.
*
* @var string
*/
protected $group;
/**
* {@inheritdoc}
*/
public function getLabel() {
return $this->label;
}
/**
* {@inheritdoc}
*/
public function setLabel($label) {
$this->label = $label;
return $this;
}
/**
* {@inheritdoc}
*/
public function getPath() {
return $this->path;
}
/**
* {@inheritdoc}
*/
public function setPath($path) {
$this->path = $path;
return $this;
}
/**
* {@inheritdoc}
*/
public function getGroup() {
return $this->group;
}
/**
* {@inheritdoc}
*/
public function setGroup($group) {
$this->group = $group;
return $this;
}
/**
* {@inheritdoc}
*/
public function jsonSerialize() {
return [
'label' => $this
->getLabel(),
'path' => $this
->getPath(),
'group' => $this
->getGroup(),
];
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
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 | 1 | |
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:: |