As you implemented the override for the form field widget, it is also possible to override the experimental Field formatter builder. This can easily done using the same implementation you did :
the Class located in the folder Plugin\Field\FieldWidget would looks like this :
<?php
namespace Drupal\lpb\Plugin\Field\FieldFormatter;
use Drupal\layout_paragraphs\Plugin\Field\FieldFormatter\LayoutParagraphsBuilderFormatter;
use Drupal\paragraphs_browser\Plugin\Field\FieldWidget\ParagraphsBrowserWidgetTrait;
/**
* Happy Layout Paragraphs field formatter.
*
* @FieldFormatter(
* id = "lpb_layout_paragraphs_builder",
* label = @Translation("Layout Paragraphs Builder using paragraphs browser (Experimental)"),
* description = @Translation("Renders editable paragraphs with layout and using paragraphs browser."),
* field_types = {
* "entity_reference_revisions"
* }
* )
*/
class LpbLayoutParagraphsBuilderFormatter extends LayoutParagraphsBuilderFormatter {
use ParagraphsBrowserWidgetTrait;
}
Active
1.0
Code