QuestionAggregateService
in package
Question Aggregate Service
Service class for editing question data.
Dependencies are injected to enable mocking.
Table of Contents
Properties
- $deleteService : DeleteService
- $modelPermission : Permission
- $saveService : SaveService
- $yiiDb : CDbConnection
Methods
- __construct() : mixed
- checkUpdatePermission() : void
- delete() : mixed
- deleteAnswer() : void
- Delete answer from a question.
- deleteMany() : mixed
- save() : Question
- Based on QuestionAdministrationController::actionSaveQuestionData()
Properties
$deleteService
private
DeleteService
$deleteService
$modelPermission
private
Permission
$modelPermission
$saveService
private
SaveService
$saveService
$yiiDb
private
CDbConnection
$yiiDb
Methods
__construct()
public
__construct(SaveService $saveService, DeleteService $deleteService, Permission $modelPermission, CDbConnection $yiiDb) : mixed
Parameters
- $saveService : SaveService
- $deleteService : DeleteService
- $modelPermission : Permission
- $yiiDb : CDbConnection
checkUpdatePermission()
public
checkUpdatePermission( $surveyId) : void
Parameters
Tags
delete()
public
delete(mixed $surveyId, mixed $questionId) : mixed
Parameters
- $surveyId : mixed
- $questionId : mixed
deleteAnswer()
Delete answer from a question.
public
deleteAnswer( $surveyId, $answerId) : void
All language entries for this answer will be deleted.
Parameters
deleteMany()
public
deleteMany(mixed $surveyId, mixed $questionIds) : mixed
Parameters
- $surveyId : mixed
- $questionIds : mixed
save()
Based on QuestionAdministrationController::actionSaveQuestionData()
public
save(int $surveyId, mixed $input) : Question
Parameters
- $surveyId : int
- $input : mixed