class StoreMerge extendsFormRequest

Properties

LabelTree $tree The label tree to create/remove the labels of.
array $create Flat array of labels to create.
array $remove Array of label IDs to remove.

Methods

bool
authorize()

Determine if the user is authorized to make this request.

array
rules()

Get the validation rules that apply to the request.

void
withValidator(Validator$validator)

Configure the validator instance.

validateCreate(Validator$validator)

Validate the create labels.

validateRemove(Validator$validator)

Validate the remove labels.

array
getFlatLabels(array$labels,array$carry =[],int$index =-1)

Returns a flat list of a nested array of labels and assigns a parent_index to each label, which indicates the position of the parent label in the list (as opposed to a parent_id, sinde the labels have no ID yet).

Details

at line41
bool authorize()

Determine if the user is authorized to make this request.

Return Value

bool

at line55
array rules()

Get the validation rules that apply to the request.

Return Value

array

at line69
void withValidator(Validator$validator)

Configure the validator instance.

Parameters

Validator $validator

Return Value

void

at line82
protected validateCreate(Validator$validator)

Validate the create labels.

Parameters

Validator $validator

at line122
protected validateRemove(Validator$validator)

Validate the remove labels.

Parameters

Validator $validator

at line159
protectedarray getFlatLabels(array$labels,array$carry =[],int$index =-1)

Returns a flat list of a nested array of labels and assigns a parent_index to each label, which indicates the position of the parent label in the list (as opposed to a parent_id, sinde the labels have no ID yet).

Parameters

array $labels
array $carry
int $index

Return Value

array