interface ExtraFieldDisplayInterface in Extra Field 8.2
Same name and namespace in other branches
- 8 src/Plugin/ExtraFieldDisplayInterface.php \Drupal\extra_field\Plugin\ExtraFieldDisplayInterface
Defines an interface for Extra Field Display plugins.
Hierarchy
- interface \Drupal\Component\Plugin\PluginInspectionInterface
- interface \Drupal\extra_field\Plugin\ExtraFieldDisplayInterface
Expanded class hierarchy of ExtraFieldDisplayInterface
All classes that implement ExtraFieldDisplayInterface
File
- src/
Plugin/ ExtraFieldDisplayInterface.php, line 12
Namespace
Drupal\extra_field\PluginView source
interface ExtraFieldDisplayInterface extends PluginInspectionInterface {
/**
* Builds a renderable array for the field.
*
* @param \Drupal\Core\Entity\ContentEntityInterface $entity
* The field's host entity.
*
* @return array
* Renderable array.
*/
public function view(ContentEntityInterface $entity);
/**
* Stores the field's parent entity.
*
* @param \Drupal\Core\Entity\ContentEntityInterface $entity
* The entity that hosts the field.
*/
public function setEntity(ContentEntityInterface $entity);
/**
* Returns the field's parent entity.
*
* @return \Drupal\Core\Entity\ContentEntityInterface
* The entity that hosts the field.
*/
public function getEntity();
/**
* Stores the entity view display.
*
* @param \Drupal\Core\Entity\Display\EntityViewDisplayInterface $display
* The entity view display holding the display options configured for the
* entity components. As provided by hook_entity_view()
*/
public function setEntityViewDisplay(EntityViewDisplayInterface $display);
/**
* Returns the entity view display object of the field's host entity.
*
* @return \Drupal\Core\Entity\Display\EntityViewDisplayInterface
* The entity view display object.
*/
public function getEntityViewDisplay();
/**
* Stores the entity view mode.
*
* @param string $viewMode
* The view mode the entity is rendered in. As provided by
* hook_entity_view().
*/
public function setViewMode($viewMode);
/**
* Returns the entity view mode object of the field's host entity.
*
* @return string
* The view mode the field is being rendered in.
*/
public function getViewMode();
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ExtraFieldDisplayInterface:: |
public | function | Returns the field's parent entity. | 1 |
ExtraFieldDisplayInterface:: |
public | function | Returns the entity view display object of the field's host entity. | 1 |
ExtraFieldDisplayInterface:: |
public | function | Returns the entity view mode object of the field's host entity. | 1 |
ExtraFieldDisplayInterface:: |
public | function | Stores the field's parent entity. | 1 |
ExtraFieldDisplayInterface:: |
public | function | Stores the entity view display. | 1 |
ExtraFieldDisplayInterface:: |
public | function | Stores the entity view mode. | 1 |
ExtraFieldDisplayInterface:: |
public | function | Builds a renderable array for the field. | 6 |
PluginInspectionInterface:: |
public | function | Gets the definition of the plugin implementation. | 4 |
PluginInspectionInterface:: |
public | function | Gets the plugin_id of the plugin instance. | 2 |