Skip to content

refactor!: rename the remaining ctype API to content section - #6788

Merged
gharlan merged 2 commits into
6.xfrom
refactor/content-section-api
Oct 21, 2026
Merged

gharlan merged 2 commits into
6.xfrom
refactor/content-section-api

Conversation

@gharlan

@gharlan gharlan commented Oct 21, 2026

Copy link
Copy Markdown
Member

Follow-up to #6786: renames what is left of the ctype naming in the public API, using content_section_id / $contentSectionId throughout (matching the DB column, ArticleSlice::$contentSectionId and the typed extension points).

Breaking changes

  • ArticleSlice::getFirstSliceForCtype() → getFirstSliceForContentSection() (with rector rule)
  • ContentHandler::addSlice(): parameter $ctypeId → $contentSectionId (relevant for named arguments)
  • Backend request parameter ctype → content_section_id (content/edit, content/functions, meta sidebar)
  • Extension point param ctype → content_section_id in SLICE_BE_PREVIEW, STRUCTURE_CONTENT_MODULE_SELECT, STRUCTURE_CONTENT_HEADER, STRUCTURE_CONTENT_BEFORE_SLICES, STRUCTURE_CONTENT_AFTER_SLICES and STRUCTURE_CONTENT_SIDEBAR

Internal

  • StructureContext::$ctypeId → $contentSectionId (rector rule for the 5.x getCtypeId() adjusted)
  • ArticleSlice::forNewSlice(): parameter renamed
  • Subpage keys of the content sections ctype<n> → content_section<n>, JS var history_ctype_id → history_content_section_id

The revision switcher in boot/backend.php now builds its context from typed values instead of the raw EP params, which removes a psalm baseline entry.

Local variables ($ctype in the content pages etc.) are left for later.

- `ArticleSlice::getFirstSliceForCtype()` becomes `getFirstSliceForContentSection()`
- the `$ctypeId` parameter of `ContentHandler::addSlice()` becomes `$contentSectionId`
- the backend request parameter `ctype` becomes `content_section_id`, as does the param of the
  `SLICE_BE_PREVIEW`, `STRUCTURE_CONTENT_MODULE_SELECT` and `STRUCTURE_CONTENT_*` extension points
- `StructureContext::$ctypeId` becomes `$contentSectionId`
@gharlan gharlan added this to the REDAXO 6.0 milestone Oct 21, 2026
@gharlan
gharlan enabled auto-merge (squash) October 21, 2026 22:10
@gharlan
gharlan merged commit 9fbe9f9 into 6.x Oct 21, 2026
15 checks passed
@gharlan
gharlan deleted the refactor/content-section-api branch October 21, 2026 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants