ExportHeadingTrait
Shared heading formatting logic for export writers.
Replicates the legacy Writer::getFullHeading() format which produces headings like "Question text [Subquestion]" for questions with subquestions.
Table of Contents
Methods
- buildQuestionHeading() : string
- Build a question heading matching the legacy export "full" heading format.
- cleanHeadingText() : string
- Strip HTML tags and decode entities from text.
Methods
buildQuestionHeading()
Build a question heading matching the legacy export "full" heading format.
private
buildQuestionHeading(array<string|int, mixed> $question) : string
Parameters
- $question : array<string|int, mixed>
-
Question field map entry
Return values
stringcleanHeadingText()
Strip HTML tags and decode entities from text.
private
cleanHeadingText(string $text) : string
Parameters
- $text : string