class ExampleAllNodes in Extra Field 8.2
Same name and namespace in other branches
- 8 modules/extra_field_example/src/Plugin/ExtraField/Display/ExampleAllNodes.php \Drupal\extra_field_example\Plugin\ExtraField\Display\ExampleAllNodes
Example Extra field Display.
Plugin annotation
@ExtraFieldDisplay(
id = "all_nodes",
label = @Translation("For all nodes"),
description = @Translation("An extra field to display static text."),
bundles = {
"node.*"
},
weight = -30,
visible = true
)
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\extra_field\Plugin\ExtraFieldDisplayBase implements ExtraFieldDisplayInterface
- class \Drupal\extra_field_example\Plugin\ExtraField\Display\ExampleAllNodes
- class \Drupal\extra_field\Plugin\ExtraFieldDisplayBase implements ExtraFieldDisplayInterface
Expanded class hierarchy of ExampleAllNodes
File
- modules/
extra_field_example/ src/ Plugin/ ExtraField/ Display/ ExampleAllNodes.php, line 22
Namespace
Drupal\extra_field_example\Plugin\ExtraField\DisplayView source
class ExampleAllNodes extends ExtraFieldDisplayBase {
/**
* {@inheritdoc}
*/
public function view(ContentEntityInterface $entity) {
return [
'#markup' => 'This is output from ExampleAllNodes',
];
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ExampleAllNodes:: |
public | function |
Builds a renderable array for the field. Overrides ExtraFieldDisplayInterface:: |
|
ExtraFieldDisplayBase:: |
protected | property | The field's parent entity. | |
ExtraFieldDisplayBase:: |
protected | property | The entity view display. | |
ExtraFieldDisplayBase:: |
protected | property | The view mode the entity is rendered in. | |
ExtraFieldDisplayBase:: |
public | function |
Returns the field's parent entity. Overrides ExtraFieldDisplayInterface:: |
|
ExtraFieldDisplayBase:: |
public | function |
Returns the entity view display object of the field's host entity. Overrides ExtraFieldDisplayInterface:: |
|
ExtraFieldDisplayBase:: |
public | function |
Returns the entity view mode object of the field's host entity. Overrides ExtraFieldDisplayInterface:: |
|
ExtraFieldDisplayBase:: |
public | function |
Stores the field's parent entity. Overrides ExtraFieldDisplayInterface:: |
|
ExtraFieldDisplayBase:: |
public | function |
Stores the entity view display. Overrides ExtraFieldDisplayInterface:: |
|
ExtraFieldDisplayBase:: |
public | function |
Stores the entity view mode. Overrides ExtraFieldDisplayInterface:: |
|
PluginBase:: |
protected | property | Configuration information passed into the plugin. | 1 |
PluginBase:: |
protected | property | The plugin implementation definition. | 1 |
PluginBase:: |
protected | property | The plugin_id. | |
PluginBase:: |
constant | A string which is used to separate base plugin IDs from the derivative ID. | ||
PluginBase:: |
public | function |
Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the definition of the plugin implementation. Overrides PluginInspectionInterface:: |
3 |
PluginBase:: |
public | function |
Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface:: |
|
PluginBase:: |
public | function | Determines if the plugin is configurable. | |
PluginBase:: |
public | function | Constructs a \Drupal\Component\Plugin\PluginBase object. | 92 |