class EntityViewBuilderDecorator in Devel 8
Same name and namespace in other branches
- 8.3 webprofiler/src/Entity/EntityViewBuilderDecorator.php \Drupal\webprofiler\Entity\EntityViewBuilderDecorator
 - 8.2 webprofiler/src/Entity/EntityViewBuilderDecorator.php \Drupal\webprofiler\Entity\EntityViewBuilderDecorator
 - 4.x webprofiler/src/Entity/EntityViewBuilderDecorator.php \Drupal\webprofiler\Entity\EntityViewBuilderDecorator
 
Class EntityViewBuilderDecorator
Hierarchy
- class \Drupal\webprofiler\Decorator
- class \Drupal\webprofiler\Entity\EntityDecorator
- class \Drupal\webprofiler\Entity\EntityViewBuilderDecorator implements EntityHandlerInterface, EntityViewBuilderInterface
 
 
 - class \Drupal\webprofiler\Entity\EntityDecorator
 
Expanded class hierarchy of EntityViewBuilderDecorator
File
- webprofiler/
src/ Entity/ EntityViewBuilderDecorator.php, line 16  
Namespace
Drupal\webprofiler\EntityView source
class EntityViewBuilderDecorator extends EntityDecorator implements EntityHandlerInterface, EntityViewBuilderInterface {
  /**
   * @param EntityViewBuilderInterface $controller
   */
  public function __construct(EntityViewBuilderInterface $controller) {
    parent::__construct($controller);
    $this->entities = [];
  }
  /**
   * {@inheritdoc}
   */
  public function buildComponents(array &$build, array $entities, array $displays, $view_mode, $langcode = NULL) {
    $this
      ->getOriginalObject()
      ->buildComponents($build, $entities, $displays, $view_mode, $langcode);
  }
  /**
   * {@inheritdoc}
   */
  public function view(EntityInterface $entity, $view_mode = 'full', $langcode = NULL) {
    $this->entities[] = $entity;
    return $this
      ->getOriginalObject()
      ->view($entity, $view_mode, $langcode);
  }
  /**
   * {@inheritdoc}
   */
  public function viewMultiple(array $entities = [], $view_mode = 'full', $langcode = NULL) {
    $this->entities = array_merge($this->entities, $entities);
    return $this
      ->getOriginalObject()
      ->viewMultiple($entities, $view_mode, $langcode);
  }
  /**
   * {@inheritdoc}
   */
  public function resetCache(array $entities = NULL) {
    $this
      ->getOriginalObject()
      ->resetCache($entities);
  }
  /**
   * {@inheritdoc}
   */
  public function viewField(FieldItemListInterface $items, $display_options = []) {
    return $this
      ->getOriginalObject()
      ->viewField($items, $display_options);
  }
  /**
   * {@inheritdoc}
   */
  public function viewFieldItem(FieldItemInterface $item, $display_options = []) {
    return $this
      ->getOriginalObject()
      ->viewFieldItem($item, $display_options);
  }
  /**
   * {@inheritdoc}
   */
  public function getCacheTags() {
    return $this
      ->getOriginalObject()
      ->getCacheTag();
  }
  /**
   * {@inheritdoc}
   */
  public static function createInstance(ContainerInterface $container, EntityTypeInterface $entity_type) {
    return new static($entity_type, $container
      ->get('entity.manager'), $container
      ->get('language_manager'));
  }
}Members
| 
            Name | 
                  Modifiers | Type | Description | Overrides | 
|---|---|---|---|---|
| 
            Decorator:: | 
                  protected | property | @var | |
| 
            Decorator:: | 
                  public | function | Return the original (i.e. non decorated) object. | |
| 
            Decorator:: | 
                  public | function | Returns true if $method is a PHP callable. | |
| 
            Decorator:: | 
                  public | function | ||
| 
            Decorator:: | 
                  public | function | ||
| 
            EntityDecorator:: | 
                  protected | property | ||
| 
            EntityDecorator:: | 
                  public | function | ||
| 
            EntityViewBuilderDecorator:: | 
                  public | function | 
            Builds the component fields and properties of a set of entities. Overrides EntityViewBuilderInterface:: | 
                  |
| 
            EntityViewBuilderDecorator:: | 
                  public static | function | 
            Instantiates a new instance of this entity handler. Overrides EntityHandlerInterface:: | 
                  |
| 
            EntityViewBuilderDecorator:: | 
                  public | function | 
            The cache tag associated with this entity view builder. Overrides EntityViewBuilderInterface:: | 
                  |
| 
            EntityViewBuilderDecorator:: | 
                  public | function | 
            Resets the entity render cache. Overrides EntityViewBuilderInterface:: | 
                  |
| 
            EntityViewBuilderDecorator:: | 
                  public | function | 
            Builds the render array for the provided entity. Overrides EntityViewBuilderInterface:: | 
                  |
| 
            EntityViewBuilderDecorator:: | 
                  public | function | 
            Builds a renderable array for the value of a single field in an entity. Overrides EntityViewBuilderInterface:: | 
                  |
| 
            EntityViewBuilderDecorator:: | 
                  public | function | 
            Builds a renderable array for a single field item. Overrides EntityViewBuilderInterface:: | 
                  |
| 
            EntityViewBuilderDecorator:: | 
                  public | function | 
            Builds the render array for the provided entities. Overrides EntityViewBuilderInterface:: | 
                  |
| 
            EntityViewBuilderDecorator:: | 
                  public | function | 
            Overrides Decorator:: |