QuickEditIntegration
class QuickEditIntegration implements ContainerInjectionInterface (View source)
| internal | This is an internal utility class wrapping hook implementations. |
Helper methods for Quick Edit module integration.
Traits
Wrapper methods for the logger factory service.
Properties
| protected LoggerChannelFactoryInterface | $loggerFactory | The logger channel factory service. |
from LoggerChannelTrait |
| protected SectionStorageManagerInterface | $sectionStorageManager | The section storage manager. |
|
| protected AccountInterface | $currentUser | The current user. |
|
| protected EntityTypeManagerInterface | $entityTypeManager | The entity type manager. |
Methods
Gets the logger for a specific channel.
Constructs a new QuickEditIntegration object.
Instantiates a new instance of this class.
Alters the entity view build for Quick Edit compatibility.
Deconstructs the Quick Edit view mode ID into its constituent parts.
Re-renders a field rendered by Layout Builder, edited with Quick Edit.
Details
protected LoggerInterface
getLogger(string $channel)
Gets the logger for a specific channel.
$this
setLoggerFactory(LoggerChannelFactoryInterface $logger_factory)
Injects the logger channel factory.
__construct(SectionStorageManagerInterface $section_storage_manager, AccountInterface $current_user, EntityTypeManagerInterface $entity_type_manager)
Constructs a new QuickEditIntegration object.
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.
entityViewAlter(array $build, EntityInterface $entity, EntityViewDisplayInterface $display)
Alters the entity view build for Quick Edit compatibility.
When rendering fields outside of normal view modes, Quick Edit requires that modules identify themselves with a view mode ID in the format [module_name]-[information the module needs to rerender], as prescribed by hook_quickedit_render_field().
static array
deconstructViewModeId(string $quick_edit_view_mode_id)
Deconstructs the Quick Edit view mode ID into its constituent parts.
array
quickEditRenderField(FieldableEntityInterface $entity, string $field_name, string $quick_edit_view_mode_id, string $langcode)
Re-renders a field rendered by Layout Builder, edited with Quick Edit.