Class CopyQuestion
This class is responsible for the copy question process.
package | LimeSurvey\Models\Services |
---|
__construct(\LimeSurvey\Datavalueobjects\CopyQuestionValues $copyQuestionValues)
copyQuestion(array $copyOptions): boolean
array
has the following boolean elements ['copySubquestions'] ['copyAnswerOptions'] ['copyDefaultAnswers'] ['copySettings'] --> generalSettings and advancedSettings
boolean
True if new copied question could be saved, false otherwise
copyQuestionLanguages(\Question $oQuestion,\LimeSurvey\Models\Services\array<string,\LimeSurvey\Datavalueobjects\CopyQuestionTextValues> $newQuestionL10nData = array()): boolean
before | $this->newQuestion must exist and should not be null |
---|
\LimeSurvey\Models\Services\array
the text values to override
boolean
true if all languages could be copied, false if no language was copied or save failed for one language
copyQuestionsAnswerOptions(integer $questionIdToCopy)
integer
copyQuestionsDefaultAnswers(integer $questionIdToCopy)
integer
copyQuestionsSettings( $questionIdToCopy): boolean
boolean
True if settings are copied, false otherwise
copyQuestionsSubQuestions(integer $parentId): boolean
integer
id of question to be copied
boolean
true if all subquestions could be copied&saved, false if a subquestion could not be saved
createNewCopiedQuestion(string $questionCode,integer $groupId,\Question $questionToCopy): boolean
string
integer
boolean
true if question could be saved, false otherwise
getNewCopiedQuestion(): \Question|null
copyQuestionValues :\LimeSurvey\Datavalueobjects\CopyQuestionValues
var | values needed to copy a question (e.g. questioncode, questionGroupId ...) |
---|
\LimeSurvey\Datavalueobjects\CopyQuestionValues