SurveysGroupCreator
in package
Service class for survey group creation.
All dependencies are injected to enable mocking.
Table of Contents
Properties
- $messages : array<string|int, TypedMessage>
- $request : LSHttpRequest
- $surveysGroup : SurveysGroups
- $surveysGroupsettings : SurveysGroupsettings
- $user : LSWebUser
Methods
- __construct() : mixed
- getMessages() : array<string|int, TypedMessage>
- Returns the messages of the given type, or all messages if no type is specified.
- save() : bool
- Saves the SurveysGroups and SurveysGroupsettings models with data from the request.
Properties
$messages
private
array<string|int, TypedMessage>
$messages
= []
an array of messages providing extra details
$request
private
LSHttpRequest
$request
$surveysGroup
private
SurveysGroups
$surveysGroup
$surveysGroupsettings
private
SurveysGroupsettings
$surveysGroupsettings
$user
private
LSWebUser
$user
Methods
__construct()
public
__construct(LSHttpRequest $request, LSWebUser $user, SurveysGroups $surveysGroup, SurveysGroupsettings $surveysGroupsettings) : mixed
Parameters
- $request : LSHttpRequest
- $user : LSWebUser
- $surveysGroup : SurveysGroups
- $surveysGroupsettings : SurveysGroupsettings
getMessages()
Returns the messages of the given type, or all messages if no type is specified.
public
getMessages([string|null $type = null ]) : array<string|int, TypedMessage>
Parameters
- $type : string|null = null
Return values
array<string|int, TypedMessage>save()
Saves the SurveysGroups and SurveysGroupsettings models with data from the request.
public
save() : bool
Tags
Return values
bool —True on success.