StoreLabelTreeMerge
class StoreLabelTreeMerge extends FormRequest
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
Determine if the user is authorized to make this request.
Get the validation rules that apply to the request.
Configure the validator instance.
Validate the create labels.
Validate the remove labels.
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 line 38
bool
authorize()
Determine if the user is authorized to make this request.
at line 52
array
rules()
Get the validation rules that apply to the request.
at line 66
void
withValidator(Validator $validator)
Configure the validator instance.
at line 83
protected
validateCreate(Validator $validator)
Validate the create labels.
at line 121
protected
validateRemove(Validator $validator)
Validate the remove labels.
at line 155
protected 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).