Documentation

CreateOutcomeGroupDTO extends AbstractBaseDto
in package

Data Transfer Object for creating outcome groups.

Table of Contents

Properties

$description  : string|null
$parentOutcomeGroupId  : int|null
$title  : string|null
$vendorGuid  : string|null
$apiPropertyName  : string
The name of the property in the API

Methods

__construct()  : mixed
BaseDto constructor.
asSubgroup()  : self
Create a subgroup with parent.
toApiArray()  : array<string|int, mixed>
Convert the DTO to an array for API requests
toArray()  : array<int, array{name: string, contents: string}>
Convert DTO to array for API request.
validate()  : bool
Validate the DTO data.
withTitle()  : self
Create a group with required title only.
withTitleAndDescription()  : self
Create a group with title and description.
withVendorGuid()  : self
Set vendor GUID for external integration.

Properties

$apiPropertyName

The name of the property in the API

protected string $apiPropertyName = 'outcome_group'

Methods

__construct()

BaseDto constructor.

public __construct([array<string, mixed> $data = [] ]) : mixed
Parameters
$data : array<string, mixed> = []

asSubgroup()

Create a subgroup with parent.

public static asSubgroup(string $title, int $parentGroupId) : self
Parameters
$title : string
$parentGroupId : int
Return values
self

toApiArray()

Convert the DTO to an array for API requests

public toApiArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

toArray()

Convert DTO to array for API request.

public toArray() : array<int, array{name: string, contents: string}>
Return values
array<int, array{name: string, contents: string}>

withTitle()

Create a group with required title only.

public static withTitle(string $title) : self
Parameters
$title : string
Return values
self

withTitleAndDescription()

Create a group with title and description.

public static withTitleAndDescription(string $title, string $description) : self
Parameters
$title : string
$description : string
Return values
self

withVendorGuid()

Set vendor GUID for external integration.

public withVendorGuid(string $vendorGuid) : self
Parameters
$vendorGuid : string
Return values
self

        
On this page

Search results