class AliasGet in Services 8.4
Same name in this branch
- 8.4 src/Plugin/Deriver/AliasGet.php \Drupal\services\Plugin\Deriver\AliasGet
- 8.4 src/Plugin/ServiceDefinition/AliasGet.php \Drupal\services\Plugin\ServiceDefinition\AliasGet
Same name and namespace in other branches
- 9.0.x src/Plugin/Deriver/AliasGet.php \Drupal\services\Plugin\Deriver\AliasGet
Class \Drupal\services\Plugin\Deriver\AliasGet.
Hierarchy
- class \Drupal\Component\Plugin\Derivative\DeriverBase implements DeriverInterface
- class \Drupal\ctools\Plugin\Deriver\EntityDeriverBase implements ContainerDeriverInterface uses StringTranslationTrait
- class \Drupal\services\Plugin\Deriver\AliasGet
- class \Drupal\ctools\Plugin\Deriver\EntityDeriverBase implements ContainerDeriverInterface uses StringTranslationTrait
Expanded class hierarchy of AliasGet
File
- src/
Plugin/ Deriver/ AliasGet.php, line 10
Namespace
Drupal\services\Plugin\DeriverView source
class AliasGet extends EntityDeriverBase {
/**
* {@inheritdoc}
*/
public function getDerivativeDefinitions($base_plugin_definition) {
foreach ($this->entityTypeManager
->getDefinitions() as $entity_type_id => $entity_type) {
if ($entity_type_id === 'node') {
$this->derivatives[$entity_type_id] = $base_plugin_definition;
$this->derivatives[$entity_type_id]['title'] = $this
->t('@label: Alias Retrieve', [
'@label' => $entity_type
->getLabel(),
]);
$this->derivatives[$entity_type_id]['description'] = $this
->t('Retrieves a @entity_type_id object and serializes it as a response to the current request.', [
'@entity_type_id' => $entity_type_id,
]);
$this->derivatives[$entity_type_id]['category'] = $this
->t('@label', [
'@label' => $entity_type
->getLabel(),
]);
$this->derivatives[$entity_type_id]['path'] = "{$entity_type_id}_alias";
}
}
return $this->derivatives;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AliasGet:: |
public | function |
Gets the definition of all derivatives of a base plugin. Overrides DeriverBase:: |
|
DeriverBase:: |
protected | property | List of derivative definitions. | 1 |
DeriverBase:: |
public | function |
Gets the definition of a derivative plugin. Overrides DeriverInterface:: |
|
EntityDeriverBase:: |
protected | property | The entity field manager. | |
EntityDeriverBase:: |
protected | property | The entity type manager. | |
EntityDeriverBase:: |
protected | property | The entity type repository. | |
EntityDeriverBase:: |
public static | function |
Creates a new class instance. Overrides ContainerDeriverInterface:: |
|
EntityDeriverBase:: |
public | function | Constructs new EntityViewDeriver. | |
StringTranslationTrait:: |
protected | property | The string translation service. | 1 |
StringTranslationTrait:: |
protected | function | Formats a string containing a count of items. | |
StringTranslationTrait:: |
protected | function | Returns the number of plurals supported by a given language. | |
StringTranslationTrait:: |
protected | function | Gets the string translation service. | |
StringTranslationTrait:: |
public | function | Sets the string translation service to use. | 2 |
StringTranslationTrait:: |
protected | function | Translates a string to the current language or to a given language. |