PaymentPickerLabel
in package
Single source of the payment label for the picker. The suggester and the `labelResolver` ({@see \App\UI\Admin\System\Presenters\Traits\Pickers\PaymentPickerTrait}) share it with the selection modal over the grid ({@see \App\UI\Admin\System\Presenters\PaymentPresenter}, through `DataGrid::setPickerLabelCallback()`). If they diverged, the modal would show a different text than the one left in the input after selecting.
IMPORTANT: the label is not based on code, because most payments have it empty; the input stayed
empty after selecting in the modal (the id was transferred, only the text was missing, which
looked like a broken mapping). The label therefore rests on the variable symbol and always has a
non-empty fallback #id.
Table of Contents
Methods
- format() : string
- Formats `#82 · VS 12345 · 249,00`: id (always), distinguishing symbol and amount.
Methods
format()
Formats `#82 · VS 12345 · 249,00`: id (always), distinguishing symbol and amount.
public
static format(Payment $payment) : string
The currency is left out on purpose: it would have to be fetched per row (N+1 in the grid) and adds nothing for a single-currency shop.
Parameters
- $payment : Payment