I'm trying to figure out what is the purpose of entity_keys
in ContentEntityBase
entities and what fields should be set as entity_keys
.
For example in \Drupal\node\Entity\Node we have such entity_keys:
entity_keys = {
"id" = "nid",
"revision" = "vid",
"bundle" = "type",
"label" = "title",
"langcode" = "langcode",
"uuid" = "uuid",
"status" = "status",
"uid" = "uid",
}
Why exactly these fields are selected to be entity_keys
? And, for example, why in \Drupal\comment\Entity\Comment status
isn't in entity_keys
?