I don't know how the EntityNG conversions factor in to all of this, but as far as ConfigEntity goes, all of the "entity keys" (id/label/bundle/uuid) are public properties. They shouldn't be. We should work toward making them all protected.

This is just a first attempt. To see what happens.

CommentFileSizeAuthor
protected-properties-ftw.patch16.97 KBtim.plunkett
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Status: Needs review » Needs work

The last submitted patch, protected-properties-ftw.patch, failed testing.

xjm’s picture

andypost’s picture

Suppose better to split this into set of issues to fix each module separate

Berdir’s picture

This doesn't go in the same direction as EntityNG. EntityNG does, in fact, *remove* them completely, they are currently on there for autocomplete support but if we move to interfaces, there's not much point in keeping that either.

xjm’s picture

Oh. I don't think we should make everything protected. Just stuff that should never change, like metadata and the unique identifiers.

Berdir’s picture

EntityNG does not make that difference. Everything that is a field of an entity (this includes id's, everything is a field) is access as a property but through magic getters.

tim.plunkett’s picture

Status: Needs work » Closed (duplicate)