SupplierPickerTrait
Picker of the default supplier of a stock item.
A single-field picker (like PagePickerTrait)
without fieldMap: the item copies nothing else from the supplier, only the FK (the object-graph
association StockItem.supplier).
Table of Contents
Properties
Methods
- supplierPicker() : PickerConfig
- resolveSupplierLabel() : string|null
- suggestSuppliers() : array<int, array{id: int, label: string}>
- supplierLabel() : string
Properties
$supplierManager
public
SupplierManager
$supplierManager
Attributes
- #[Inject]
Methods
supplierPicker()
protected
supplierPicker(string $formName, string $targetField) : PickerConfig
Parameters
- $formName : string
- $targetField : string
Return values
PickerConfigresolveSupplierLabel()
private
resolveSupplierLabel(int $id) : string|null
Parameters
- $id : int
Return values
string|nullsuggestSuppliers()
private
suggestSuppliers(string $query) : array<int, array{id: int, label: string}>
Parameters
- $query : string
Return values
array<int, array{id: int, label: string}>supplierLabel()
private
supplierLabel(Supplier $supplier) : string
Parameters
- $supplier : Supplier