Repository navigation
refactor!: rename the remaining ctype API to content section - #6788
Merged
Merged
Conversation
- `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`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #6786: renames what is left of the
ctypenaming in the public API, usingcontent_section_id/$contentSectionIdthroughout (matching the DB column,ArticleSlice::$contentSectionIdand the typed extension points).Breaking changes
ArticleSlice::getFirstSliceForCtype()→getFirstSliceForContentSection()(with rector rule)ContentHandler::addSlice(): parameter$ctypeId→$contentSectionId(relevant for named arguments)ctype→content_section_id(content/edit,content/functions, meta sidebar)ctype→content_section_idinSLICE_BE_PREVIEW,STRUCTURE_CONTENT_MODULE_SELECT,STRUCTURE_CONTENT_HEADER,STRUCTURE_CONTENT_BEFORE_SLICES,STRUCTURE_CONTENT_AFTER_SLICESandSTRUCTURE_CONTENT_SIDEBARInternal
StructureContext::$ctypeId→$contentSectionId(rector rule for the 5.xgetCtypeId()adjusted)ArticleSlice::forNewSlice(): parameter renamedctype<n>→content_section<n>, JS varhistory_ctype_id→history_content_section_idThe revision switcher in
boot/backend.phpnow builds its context from typed values instead of the raw EP params, which removes a psalm baseline entry.Local variables (
$ctypein the content pages etc.) are left for later.