#629484: Add entity 'label' key info (e.g. title on node)
Introduces a label for each entity type. Media should implement this. There are two ways to go about it:
put label => "fielname" in the media_entity_info()
use label callback => "media_get_label", so we could use one of the fields to provide a nicer title.
I'm inclined to say we should do the former, and let other modules implement a callback via an alter later on. We should of course be using whatever is in the Entity API to refer to this label in the grid view, etc.
Comments
Comment #1
effulgentsia commentedAgreed with former. hook_entity_info_alter() is what other modules can use to change it. I posted a follow-up in #629484-88: Add entity 'label' key info (e.g. title on node) to ask for more feedback on whose responsibility it is to call the new entity_label() function.
Comment #2
dave reidMedia no longer uses its own entity type and uses file entity instead - this issue is no longer valid since system_entity_info already defines 'label' => 'filename' for file entities.