abstract class ExtraFieldDisplayBase in Extra Field 8
Same name and namespace in other branches
- 8.2 src/Plugin/ExtraFieldDisplayBase.php \Drupal\extra_field\Plugin\ExtraFieldDisplayBase
Base class for Extra field Display plugins.
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\extra_field\Plugin\ExtraFieldDisplayBase implements ExtraFieldDisplayInterface
Expanded class hierarchy of ExtraFieldDisplayBase
5 files declare their use of ExtraFieldDisplayBase
- AllNodeTypesTest.php in tests/
extra_field_test/ src/ Plugin/ ExtraField/ Display/ AllNodeTypesTest.php - ExampleAllNodes.php in modules/
extra_field_example/ src/ Plugin/ ExtraField/ Display/ ExampleAllNodes.php - ExampleArticle.php in modules/
extra_field_example/ src/ Plugin/ ExtraField/ Display/ ExampleArticle.php - ExampleWithDependencyInjection.php in modules/
extra_field_example/ src/ Plugin/ ExtraField/ Display/ ExampleWithDependencyInjection.php - OneNodeTypeTest.php in tests/
extra_field_test/ src/ Plugin/ ExtraField/ Display/ OneNodeTypeTest.php
File
- src/
Plugin/ ExtraFieldDisplayBase.php, line 12
Namespace
Drupal\extra_field\PluginView source
abstract class ExtraFieldDisplayBase extends PluginBase implements ExtraFieldDisplayInterface {
/**
* The field's parent entity.
*
* @var \Drupal\Core\Entity\ContentEntityInterface
*/
protected $entity;
/**
* The view mode the entity is rendered in.
*
* @var string
*/
protected $viewMode;
/**
* The entity view display.
*
* Contains the display options configured for the entity components.
*
* @var \Drupal\Core\Entity\Display\EntityViewDisplayInterface
*/
protected $entityViewDisplay;
/**
* {@inheritdoc}
*/
public function setEntity(ContentEntityInterface $entity) {
$this->entity = $entity;
}
/**
* {@inheritdoc}
*/
public function getEntity() {
return $this->entity;
}
/**
* {@inheritdoc}
*/
public function setEntityViewDisplay(EntityViewDisplayInterface $display) {
$this->entityViewDisplay = $display;
}
/**
* {@inheritdoc}
*/
public function getEntityViewDisplay() {
return $this->entityViewDisplay;
}
/**
* {@inheritdoc}
*/
public function setViewMode($viewMode) {
$this->viewMode = $viewMode;
}
/**
* {@inheritdoc}
*/
public function getViewMode() {
return $this->viewMode;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
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:: |
|
ExtraFieldDisplayInterface:: |
public | function | Builds a renderable array for the field. | 6 |
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 |