As the title says. An $entity_type_save function (usually defined as the "save callback"), should accept an entity, and save it.
Drupal Commerce already does this, chx tells me core is following this pattern too, so we should document it as a convention to follow.

So, this needs a paragraph for hook_entity_info().

CommentFileSizeAuthor
#4 943776.patch614 bytesbojanz

Comments

chx’s picture

Yes, we need this (aka subscribe)

bojanz’s picture

Hm, just realized that "save callback" is not defined for hook_entity_info, it's actually part of Entity Metadata.
Not sure what to say in the added text, if there's no property I can tie it to.
"Oh, and make sure you have a $entity_type_save function, which should accept an entity, and save it."

chx’s picture

Yeah. Not much else we can do.

bojanz’s picture

StatusFileSize
new614 bytes

I don't think we are accomplishing anything with this (too vague), but here it goes.

bojanz’s picture

Status: Active » Needs review
yched’s picture

Component: field system » base system

Does not belong to 'field system' component.

moshe weitzman’s picture

Status: Needs review » Closed (won't fix)

Seems not that useful.