public function BotchaFormController::getForms in BOTCHA Spam Prevention 7.3
Same name and namespace in other branches
- 6.3 controller/form/botcha.form.controller.inc \BotchaFormController::getForms()
Get a list of available BOTCHA form objects. @todo Respect reset (?via Cacher?)
Parameters
boolean $reset:
Return value
Overrides IBotchaFormController::getForms
File
- controller/
form/ botcha.form.controller.inc, line 68 - 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 getForms($reset = FALSE) {
$forms = array();
foreach ($this
->getModel()
->getForms() as $form) {
$forms[$form->id] = $this
->getForm($form->id, FALSE);
}
return $forms;
}