class EntityDisplayRebuilder implements ContainerInjectionInterface (View source)

internal  
 

Rebuilds all form and view modes for a passed entity bundle.

Properties

protected EntityTypeManager $entityTypeManager

The field storage config storage.

protected EntityDisplayRepository $entityDisplayRepository

The display repository.

protected EntityTypeBundleInfoInterface $entityTypeBundleInfo

The entity type bundle info.

Methods

__construct(EntityTypeManagerInterface $entity_type_manager, EntityDisplayRepositoryInterface $entity_display_repository, EntityTypeBundleInfoInterface $entity_type_bundle_info)

Constructs a new EntityDisplayRebuilder.

static 
create(ContainerInterface $container)

Instantiates a new instance of this class.

rebuildEntityTypeDisplays(string $entity_type_id, string $bundle)

Rebuild displays for single Entity Type.

Details

__construct(EntityTypeManagerInterface $entity_type_manager, EntityDisplayRepositoryInterface $entity_display_repository, EntityTypeBundleInfoInterface $entity_type_bundle_info)

Constructs a new EntityDisplayRebuilder.

Parameters

EntityTypeManagerInterface $entity_type_manager

The entity manager.

EntityDisplayRepositoryInterface $entity_display_repository

The entity display repository.

EntityTypeBundleInfoInterface $entity_type_bundle_info

The entity type bundle info.

static create(ContainerInterface $container)

Instantiates a new instance of this class.

This is a factory method that returns a new instance of this class. The factory should pass any needed dependencies into the constructor of this class, but not the container itself. Every call to this method must return a new instance of this class; that is, it may not implement a singleton.

Parameters

ContainerInterface $container

The service container this instance should use.

rebuildEntityTypeDisplays(string $entity_type_id, string $bundle)

Rebuild displays for single Entity Type.

Parameters

string $entity_type_id

The entity type machine name.

string $bundle

The bundle we need to rebuild.