Skip to content

Add global blocks to Sulu 3.0 #7826

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 28, 2025

Conversation

Prokyonn
Copy link
Member

@Prokyonn Prokyonn commented Feb 26, 2025

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Issues #7672
License MIT

What's in this PR?

Adds global blocks support for the new content structure for Sulu 3.0

@Prokyonn Prokyonn changed the base branch from 2.6 to 3.0 February 26, 2025 15:40
@Prokyonn Prokyonn force-pushed the feature/global-blocks branch from 6dec5a6 to cd13ce5 Compare February 26, 2025 15:40
$contentViews = [];
foreach ($data as $key => $block) {
if (!\is_array($block) || !isset($block['type']) || !\is_string($block['type'])) {
continue;
}

$type = $block['type'];
$formMetadata = $metadataTypes[$type] ?? null;
$formMetadata = $globalBlocksMetadata[$type] ?? $metadataTypes[$type] ?? null;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we prefer always the global block here now but what if a local block type was defined without a ref to a global block?

@alexander-schranz alexander-schranz added this to the Release 3.0 milestone Feb 28, 2025
@alexander-schranz alexander-schranz added the Feature New functionality not yet included in Sulu label Feb 28, 2025
@alexander-schranz alexander-schranz merged commit b435a0b into sulu:3.0 Feb 28, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New functionality not yet included in Sulu
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants