You are here

public function BotchaFormController::save in BOTCHA Spam Prevention 7.3

Same name and namespace in other branches
  1. 6.3 controller/form/botcha.form.controller.inc \BotchaFormController::save()

Overrides IBotchaFormController::save

File

controller/form/botcha.form.controller.inc, line 77
Controller layer of the BotchaForm objects.

Class

BotchaFormController
Special class to abstract operations with form_id. It looks like additional layer of abstraction after DatabaseAbstractionLayer. It helps us to get necessary data - while we don't have to repeat ourselves in many places, writing queries to the…

Code

public function save($form) {

  // Save form to DB.
  $this
    ->getModel()
    ->save($form);

  // Return updated object to check results if necessary.
  return $this
    ->getForm($form->id, FALSE);
}