FormTrait
Requires in the host class: - $this->translator, $this->translatorDomain - $this->advertId (int) - $this->responseManager (ResponseManager), $this->currencyManager (CurrencyManager) - createFormContent(), createSuccessContent(), updateModalContent() (ModalTrait)
Table of Contents
Methods
- onError() : void
- Redraws the modal with the field errors. Without it an invalid AJAX submit (browser validation bypassed or off) redrew nothing and the visitor saw no message at all.
- onSuccess() : void
- createComponentForm() : Form
- prepareCurrencyList() : array<int, string>
- Public monetary currencies only: "Credits" must not be offered for a response price ({@see CurrencyManager::findPublicMonetaryOptions()}).
- rateLimitMessage() : NotTranslate
- "Try again later" message; with the wait in minutes when the Api sent `retryAfter` (an upper bound for the sliding Redis window, exact for the DB limiter, hence "at the latest").
Methods
onError()
Redraws the modal with the field errors. Without it an invalid AJAX submit (browser validation bypassed or off) redrew nothing and the visitor saw no message at all.
public
onError(Form $form) : void
Parameters
- $form : Form
onSuccess()
public
onSuccess(Form $form, ArrayHash $values) : void
Parameters
- $form : Form
- $values : ArrayHash
createComponentForm()
protected
createComponentForm() : Form
Return values
FormprepareCurrencyList()
Public monetary currencies only: "Credits" must not be offered for a response price ({@see CurrencyManager::findPublicMonetaryOptions()}).
private
prepareCurrencyList() : array<int, string>
Return values
array<int, string>rateLimitMessage()
"Try again later" message; with the wait in minutes when the Api sent `retryAfter` (an upper bound for the sliding Redis window, exact for the DB limiter, hence "at the latest").
private
rateLimitMessage(Result $result) : NotTranslate
Parameters
- $result : Result