Skip to content

Conversation

@very-random-man
Copy link

Added validation to the buildFromEntity method so an exception is thrown if an entity with the wrong bundle is used to instantiate a decorated object.

…own if an entity with the wrong bundle is used to instantiate a decorated object.
@njt1982
Copy link
Member

njt1982 commented Mar 31, 2015

Should we also validate the entity type matches too? What if I pass a term object into a node decorator? I guess the bundle wont validate, but would that throw any PHP errors (which aren't usable catchable) when extracting the ID from the term object if the decorator is configured to be a node?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants