Problem/Motivation

It's already possible to get the enum instance of a single field item:

$entity->get('some_taxonomy_enum_field')->enum

but it's not yet possible to get all enum instances of a field item list.

Proposed resolution

Add a new helper method to the field item list class:

$entity->get('some_taxonomy_enum_field')->enums()
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

dieterholvoet created an issue. See original summary.

dieterholvoet’s picture

Status: Active » Needs review

  • dieterholvoet committed 9aa80c26 on 1.x
    Issue #3545722 by dieterholvoet: Add helper method to get enum instances...
dieterholvoet’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.