You are here

public function FlexifromFormEntityNewReply::saveEntity in Flexiform 7

Save the entity upon submission of the form.

Parameters

$entity: The entity object being saved.

Overrides FlexiformFormEntityBase::saveEntity

File

includes/form_entity/reply.form_entity.inc, line 53
Contains class for a basic entity getter.

Class

FlexifromFormEntityNewReply
Form entity to get a new reply.

Code

public function saveEntity($entity) {

  // If the entity is still false do not save it!
  if ($entity === FALSE) {
    return;
  }
  $base_id = entity_id($this
    ->getParamType('base'), $this
    ->getParam('base'));
  $entity->entity_id = $base_id;
  parent::saveEntity($entity);
}