How nhovratov/mask-to-content-blocks works
1. This repository is a TYPO3 extension whose only job is to migrate existing Mask content elements to TYPO3 Content Blocks. It is not a site feature extension; it is a one-shot migration utility that runs inside a TYPO3 installation.
2. The main entry point is a TYPO3 CLI command, mask-to-content-blocks:migrate, implemented in Classes/Command/MaskToContentBlocksCommand.php. The command is the orchestration layer: it reads the currently loaded Mask definitions and generates Content Block definitions.
3. The migration writes the generated Content Blocks back into the same extension context where the Mask elements already live. That makes the tool a transformation bridge between two TYPO3 content-type systems rather than a standalone generator.
4. A dedicated service, Classes/Service/SvgIconService.php, handles SVG icon-related processing during generation. This suggests the migration preserves or converts icon assets as part of the Content Block output, which is a separate concern from the core element conversion logic.
5. Dependency wiring is handled through TYPO3’s service container in Configuration/Services.yaml. That file registers the command and service classes for injection, so the architecture is based on framework-managed services rather than direct instantiation.
6. The system boundary is very clear: it depends on an existing TYPO3 v13 runtime with Mask already installed and populated. The extension does not store or manage content itself; it transforms configuration/code that already exists in the TYPO3 instance.
7. The output side targets TYPO3 Content Blocks, the official TYPO3 mechanism for defining content types. So the migration path is: Mask element metadata in TYPO3 → command execution → generated Content Block definitions → manual verification and cleanup.
8. The repository also contains a .github/workflows/publish.yml, indicating automated release/publishing for the extension package. This affects distribution, not runtime behavior.
9. .ddev/config.yaml shows the project is set up for local TYPO3 development in DDEV, which matters mainly for spinning up the required TYPO3 environment and testing the migration command.
10. Operationally, the README describes a manual post-migration boundary: after generation, Mask and this extension can be removed, but TypoScript overrides and frontend/backend previews may need adjustment. That means the tool handles structure conversion, while presentation-layer validation remains outside its scope.
11. In architectural terms, this repo is a small, command-driven migration adapter with one primary workflow and one supporting service, sitting between two TYPO3 content-modeling systems.
Main entry points: MaskToContentBlocksCommand.php Migration Command · Services.yaml Service Wiring · publish.yml Publish Workflow · SvgIconService.php SVG Icon Service
Components 14
TYPO3 Migration Runtime
Executed inside an existing TYPO3 v13 installation with Mask installed and populated.
- Migration Command · Orchestrates the migration workflow from Mask definitions to Content Blocks.
Classes/Command/MaskToContentBlocksCommand.php - Mask Definitions · Loaded Mask content-element metadata that serves as the input to migration.
- Content Blocks · Generated content-type definitions written back into the extension context.
- SVG Icon Service · Processes SVG icon assets as part of the generation flow.
Classes/Service/SvgIconService.php - TYPO3 v13 · Required execution environment that provides the command framework and extension runtime.
- Mask Extension · Pre-existing extension whose content elements are migrated.
- Migration Bridge · Converts Mask element metadata into Content Block definitions.
- Post-check · Manual verification and cleanup after generation, including presentation-layer adjustments.
Project Tooling
Local development and release automation around the migration utility.
- DDEV Setup · Local TYPO3 development environment for running the migration command.
.ddev/config.yaml - Publish Workflow · GitHub Actions workflow for packaging and publishing the extension.
.github/workflows/publish.yml - Usage Guide · Explains the migration boundary, workflow, and post-migration responsibilities.
README.md
Extension Package
TYPO3 extension metadata and dependency wiring.
- Service Wiring · Registers the command and service for framework-managed injection.
Configuration/Services.yaml - Extension Meta · Extension declaration and package metadata for TYPO3/composer distribution.
ext_emconf.php - Composer Package · Composer metadata and dependencies for installation and distribution.
composer.json
Connections 16
- Service Wiring → Migration Command: injects · Registers the CLI command as a framework service.
- Service Wiring → SVG Icon Service: injects · Registers the SVG processing service for dependency injection.
- TYPO3 v13 → Service Wiring: loads · TYPO3 boots the service container configuration.
- TYPO3 v13 → Migration Command: executes · Runs the migration command inside the TYPO3 CLI runtime.
- Mask Extension → Mask Definitions: provides · Supplies the existing Mask definitions used as migration input.
- Migration Command → Mask Definitions: reads · Loads current Mask metadata before generation.
- Migration Command → Migration Bridge: drives · Coordinates the conversion workflow.
- Mask Definitions → Migration Bridge: input · Provides the source content-element structure.
- SVG Icon Service → Migration Bridge: supports · Handles SVG icon-related processing during generation.
- Migration Bridge → Content Blocks: generates · Writes Content Block definitions into the extension context.
- Content Blocks → Post-check: validated by · Requires manual verification and cleanup after generation.
- Usage Guide → Post-check: documents · Describes post-migration adjustments and boundaries.
- DDEV Setup → TYPO3 v13: hosts · Provides a local environment for running TYPO3 and the command.
- Publish Workflow → Composer Package: packages · Automates extension release/publishing.
- Publish Workflow → Extension Meta: packages · Uses extension metadata during distribution.
- Composer Package → Extension Meta: declares · Package metadata and TYPO3 extension metadata define installability.