FieldLayoutBuilder
class FieldLayoutBuilder implements ContainerInjectionInterface (View source)
Builds a field layout.
Properties
| protected LayoutPluginManagerInterface | $layoutPluginManager | The layout plugin manager. |
|
| protected EntityFieldManagerInterface | $entityFieldManager | The entity field manager. |
Methods
Constructs a new FieldLayoutBuilder.
Instantiates a new instance of this class.
Applies the layout to an entity build.
Applies the layout to an entity form.
Gets the fields that need to be processed.
Details
__construct(LayoutPluginManagerInterface $layout_plugin_manager, EntityFieldManagerInterface $entity_field_manager)
Constructs a new FieldLayoutBuilder.
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.
buildView(array $build, EntityDisplayWithLayoutInterface $display)
Applies the layout to an entity build.
buildForm(array $build, EntityDisplayWithLayoutInterface $display)
Applies the layout to an entity form.
protected array
getFields(array $build, EntityDisplayWithLayoutInterface $display, string $display_context)
Gets the fields that need to be processed.