FormTrait
Cart form: quantities, bulk removal, voucher code redemption and the step to checkout.
Single rows (remove, plus/minus, voucher removal) are handled by signals in the component.
IMPORTANT: values are read from the controls, never through getValues(). The helper
buttons use setValidationScope([]), so Nette marks controls outside the scope as
omitted and getValues() skips them.
Table of Contents
Methods
- onSuccess() : void
- createComponentForm() : Form
- applyQuantities() : void
- Stores quantities of all rows (read from the controls, see the trait docblock).
- isSubmittedBy() : bool
- removeSelectedRows() : void
- submitVoucher() : void
Methods
onSuccess()
public
onSuccess(Form $form) : void
Parameters
- $form : Form
createComponentForm()
protected
createComponentForm() : Form
Return values
FormapplyQuantities()
Stores quantities of all rows (read from the controls, see the trait docblock).
private
applyQuantities(Form $form) : void
Parameters
- $form : Form
isSubmittedBy()
private
isSubmittedBy(Form $form, string $name) : bool
Parameters
- $form : Form
- $name : string
Return values
boolremoveSelectedRows()
private
removeSelectedRows(Form $form) : void
Parameters
- $form : Form
submitVoucher()
private
submitVoucher(Form $form) : void
Parameters
- $form : Form