You are here

interface EntityToTableRendererInterface in Reference Table Formatter 2.0.x

Same name and namespace in other branches
  1. 8 src/EntityToTableRendererInterface.php \Drupal\reference_table_formatter\EntityToTableRendererInterface

An interface for an renderer which spits out tables from entities.

Hierarchy

Expanded class hierarchy of EntityToTableRendererInterface

All classes that implement EntityToTableRendererInterface

1 file declares its use of EntityToTableRendererInterface
EntityReferenceTableFormatter.php in src/Plugin/Field/FieldFormatter/EntityReferenceTableFormatter.php

File

src/EntityToTableRendererInterface.php, line 8

Namespace

Drupal\reference_table_formatter
View source
interface EntityToTableRendererInterface {

  /**
   * Render the entities to a table.
   *
   * @param string $entity_type
   *   The entity type of the given entities.
   * @param string $bundle
   *   The bundle that the entities are composed of.
   * @param \Drupal\Core\Entity\EntityInterface[] $entities
   *   An array of entities to put into the table.
   * @param array $settings
   *   The settings array from the field formatter base containing keys:
   *   - view_mode: The target view mode to render the field settings from.
   *   - show_entity_label: If we should display the entity label.
   *   - empty_cell_value: The value to show in empty cells.
   *
   * @return array
   *   A table renderable array.
   */
  public function getTable($entity_type, $bundle, array $entities, array $settings);

}

Members

Namesort descending Modifiers Type Description Overrides
EntityToTableRendererInterface::getTable public function Render the entities to a table. 1