public function PartyDefaultDataSet::saveEntity in Party 7
Same name and namespace in other branches
- 8.2 includes/party.data.inc \PartyDefaultDataSet::saveEntity()
Save an entity.
This method saves the entity at the position specified by delta. This allows for other modules to use different logic for saving their entities.
Parameters
int $delta: (optional) The delta of the entity to save. Defaults to 0.
Return value
object The entity that has been saved.
1 call to PartyDefaultDataSet::saveEntity()
- PartyDefaultDataSet::save in includes/
party.data.inc - Save the attached entities information
File
- includes/
party.data.inc, line 577 - Provides the default class for managing party - Attached entity relationships.
Class
- PartyDefaultDataSet
- Class PartyDefaultDataSet
Code
public function saveEntity($delta = 0) {
$entity = $this
->getEntity($delta);
// If getting the entity failed, return false.
if (!$entity) {
return $entity;
}
entity_save($this
->getDataInfo('entity type'), $entity);
return $entity;
}