Commit 670c03ed authored by johnle's avatar johnle Committed by Mario Hernandez
Browse files

Issue #3251763 by johnle: Unable to translate the patternkit block via layout builder

parent f343ecf6
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
patternkit.json:
  type: string
  label: 'Text with text format'
  # We declare the entire mapping of text and text format as translatable. This
  # causes the entire mapping to be saved to the language overrides of the
  # configuration. Storing only the (to be formatted) text could result in
  # security problems in case the text format of the source text is changed.
  translatable: true
  form_element_class: 'Drupal\patternkit\FormElement\PatternkitJson'
+1 −0
Original line number Diff line number Diff line
@@ -58,3 +58,4 @@ block.settings.patternkit_block:*:
    version:
      type: string
      label: 'Version of the pattern or containing library.'
  form_element_class: 'Drupal\patternkit\FormElement\PatternkitJson'
+4 −0
Original line number Diff line number Diff line
@@ -37,3 +37,7 @@ services:
    arguments: ['.', '@logger.channel.patternkit', '@patternkit.asset.library']
    tags:
      - { name: twig.loader, priority: 100 }
  patternkit.translate_layout_builder_block:
    class: Drupal\patternkit\Routing\PatternkitTranslateBlockFormRouteSubscriber
    tags:
      - { name: event_subscriber }
+4 −0
Original line number Diff line number Diff line
@@ -31,4 +31,8 @@ interface PatternInterface extends ContentEntityInterface {

  public function setTemplate($template);

  public function getAssetId();

  public function getVersion();

}
+1 −1
Original line number Diff line number Diff line
@@ -149,7 +149,7 @@ class PatternkitBlock extends BlockContent {
  /**
   * Returns the block Patternkit pattern derivative id.
   *
   * @return string|NULL
   * @return string|null
   *   The Patternkit pattern derivative id.
   */
  public function getPattern() {
Loading