2

Is it possible to get all the fields and field groups structures defined in a bundle for a view mode, in Drupal 8?

1 Answer 1

1

If I understood your question correctly, you need to use the entity_get_display() function.

It will return the entity view display, associated with the bundle and view mode you wanted. Simplest example:

$display = entity_get_display($entity_type, $bundle, $view_mode);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.