PollPlacePickerTrait
Poll place picker — the "many objects pick PollPlace" pattern (a poll picks the places where it is shown). Label = place name. Requires `$this->pollPlaceManager`.
Table of Contents
Methods
- addPollPlaceControls() : void
- pollPlacePicker() : PickerConfig
- resolvePollPlaceLabel() : string|null
- suggestPollPlaces() : array<int, array{id: int, label: string}>
Methods
addPollPlaceControls()
protected
addPollPlaceControls(Container $parent[, string $targetField = 'pollPlaceId' ][, string $displayField = 'pollPlace' ]) : void
Parameters
- $parent : Container
- $targetField : string = 'pollPlaceId'
- $displayField : string = 'pollPlace'
pollPlacePicker()
protected
pollPlacePicker([string $formName = 'editForm' ][, string|null $container = 'pollPlaces' ][, string $targetField = 'pollPlaceId' ][, string $displayField = 'pollPlace' ]) : PickerConfig
Parameters
- $formName : string = 'editForm'
- $container : string|null = 'pollPlaces'
- $targetField : string = 'pollPlaceId'
- $displayField : string = 'pollPlace'
Return values
PickerConfigresolvePollPlaceLabel()
private
resolvePollPlaceLabel(int $id) : string|null
Parameters
- $id : int
Return values
string|nullsuggestPollPlaces()
private
suggestPollPlaces(string $query) : array<int, array{id: int, label: string}>
Parameters
- $query : string