interface ExtraFieldDisplayFormattedInterface in Extra Field 8.2
Same name and namespace in other branches
- 8 src/Plugin/ExtraFieldDisplayFormattedInterface.php \Drupal\extra_field\Plugin\ExtraFieldDisplayFormattedInterface
Defines an interface for Extra Field Display plugins.
Hierarchy
- interface \Drupal\Component\Plugin\PluginInspectionInterface
- interface \Drupal\extra_field\Plugin\ExtraFieldDisplayInterface
- interface \Drupal\extra_field\Plugin\ExtraFieldDisplayFormattedInterface
- interface \Drupal\extra_field\Plugin\ExtraFieldDisplayInterface
Expanded class hierarchy of ExtraFieldDisplayFormattedInterface
All classes that implement ExtraFieldDisplayFormattedInterface
File
- src/
Plugin/ ExtraFieldDisplayFormattedInterface.php, line 10
Namespace
Drupal\extra_field\PluginView source
interface ExtraFieldDisplayFormattedInterface extends ExtraFieldDisplayInterface {
/**
* Returns the renderable array of the field item(s).
*
* @param \Drupal\Core\Entity\ContentEntityInterface $entity
* The field's host entity.
*
* @return array
* A renderable array of field elements. If this contains children, the
* field output will be rendered as a multiple value field with each child
* as a field item.
*/
public function viewElements(ContentEntityInterface $entity);
/**
* The label of the field.
*
* If applicable, the code has to take care of the translatability.
*
* @return string|\Drupal\Core\StringTranslation\TranslatableMarkup
* The field label.
*/
public function getLabel();
/**
* How to display the field label will be displayed.
*
* @return string
* Options: 'above', 'inline', 'hidden', 'visually_hidden'.
*/
public function getLabelDisplay();
/**
* The type of field.
*
* Used in the 'field--type-...' wrapper class.
*
* @return string
* The field type.
*/
public function getFieldType();
/**
* The machine name of the field.
*
* Used in the 'field--name-...' wrapper class.
*
* @return string
* The field name.
*/
public function getFieldName();
/**
* Check if the extra field has data.
*
* @return bool
* True if the field has no actual data to render. False if it only contains
* non-visible render elements such as #cache and #attached.
*/
public function isEmpty();
/**
* Gets the langcode of the field values.
*
* @return string
* The langcode.
*/
public function getLangcode();
/**
* The field is translatable.
*
* @return bool
* Whether the field's content is translatable.
*/
public function isTranslatable();
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ExtraFieldDisplayFormattedInterface:: |
public | function | The machine name of the field. | 1 |
ExtraFieldDisplayFormattedInterface:: |
public | function | The type of field. | 1 |
ExtraFieldDisplayFormattedInterface:: |
public | function | The label of the field. | 1 |
ExtraFieldDisplayFormattedInterface:: |
public | function | How to display the field label will be displayed. | 1 |
ExtraFieldDisplayFormattedInterface:: |
public | function | Gets the langcode of the field values. | 1 |
ExtraFieldDisplayFormattedInterface:: |
public | function | Check if the extra field has data. | 1 |
ExtraFieldDisplayFormattedInterface:: |
public | function | The field is translatable. | 1 |
ExtraFieldDisplayFormattedInterface:: |
public | function | Returns the renderable array of the field item(s). | 6 |
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 |