Should getType() call instead be bundle()?

Created on 2 February 2023, almost 2 years ago
Updated 22 April 2023, over 1 year ago

We're attempting to use the paragraph table formatter for a field attached to a Profile entity (from https://www.drupal.org/project/profile ). What happens is we get an error at this line https://git.drupalcode.org/project/paragraphs_table/-/blob/8.x-1.16/src/.... This happens because a Paragraph entity has no getType() method.

I see nodes have a getType() which returns $this->bundle(). I'm wondering if getType() should be $entity->bundle()? This way it'd work for non-node entities.

If this seems correct I can open an MR.

💬 Support request
Status

Fixed

Version

1.0

Component

Code

Created by

🇨🇦Canada benstjohn

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024