class EntityEmbedTestTwigController in Entity Embed 8
Controller routines for Twig theme test routes.
Hierarchy
- class \Drupal\entity_embed_test\EntityEmbedTestTwigController
Expanded class hierarchy of EntityEmbedTestTwigController
File
- tests/
modules/ entity_embed_test/ src/ EntityEmbedTestTwigController.php, line 8
Namespace
Drupal\entity_embed_testView source
class EntityEmbedTestTwigController {
/**
* Menu callback for testing entity_embed twig extension using entity ID.
*/
public function idRender() {
return [
'#theme' => 'entity_embed_twig_test',
'#entity_type' => 'node',
'#id' => '1',
];
}
/**
* Menu callback.
*
* Used for testing entity_embed twig extension using 'label' Entity Embed
* Display plugin.
*/
public function labelPluginRender() {
return [
'#theme' => 'entity_embed_twig_test',
'#entity_type' => 'node',
'#id' => '1',
'#display_plugin' => 'entity_reference:entity_reference_label',
];
}
/**
* Menu callback.
*
* Used for testing entity_embed twig extension using 'label' Entity Embed
* Display plugin without linking to the node.
*/
public function labelPluginNoLinkRender() {
return [
'#theme' => 'entity_embed_twig_test',
'#entity_type' => 'node',
'#id' => '1',
'#display_plugin' => 'entity_reference:entity_reference_label',
'#display_settings' => [
'link' => 0,
],
];
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EntityEmbedTestTwigController:: |
public | function | Menu callback for testing entity_embed twig extension using entity ID. | |
EntityEmbedTestTwigController:: |
public | function | Menu callback. | |
EntityEmbedTestTwigController:: |
public | function | Menu callback. |