Skip to content

Introduce "adapters"

Feliksas Mazeikis requested to merge research__adapters_poc into 0.x

Goals

  • Being able to write adaptors that can perform BE logic and adapt Drupal field values to match props

Non-goals

  • Good UX
  • Any UI to change the expression used for a sourceType == dynamic prop value
  • Nested adapters
  • Translations
  • API representation (JSON:API) or otherwise

MR contents

  • ** New Adapter plugin type and AdapterManager service **. Each plugin can:
    1. addInput(string $input, mixed $itemBase) - adds input to adapter instance
    2. adapt() - adapts output
    3. outputSchemaMatch($schema) - checks if $schema matches output schema of the adaptor

Tests (minimal)

  • Kernel
Edited by Wim Leers

Merge request reports