Skip to content

Mistake in example ChoicesRepository #190

@karelVanGeerdeghom

Description

@karelVanGeerdeghom

Hello,

In the ChoicesRepository class, in the getChoices method I see this code:

    foreach ($values as $value) {
        $choices[$value->getId()] = $value->getCode();
    }

I had to change this to

    foreach ($values as $value) {
        $choices[$value->getCode()] = $value->getId();
    }

to get it to work.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions