You are here

function BotchaRecipebookAbstract::getForms in BOTCHA Spam Prevention 7.2

Same name and namespace in other branches
  1. 6.2 controller/botcha_recipebook.controller.inc \BotchaRecipebookAbstract::getForms()

@todo BotchaRecipebook getForms Description.

Return value

BotchaForm

File

controller/botcha_recipebook.controller.inc, line 201
Controller layer of the BotchaRecipebook objects.

Class

BotchaRecipebookAbstract
@file Controller layer of the BotchaRecipebook objects.

Code

function getForms() {
  if (!isset($this->forms)) {
    $fs = BotchaModel::getRecipebooksForms(array(
      'mode' => 'form',
      'recipebooks' => $this->id,
    ));
    foreach ($fs as $form_id) {
      $this
        ->setForm($form_id);
    }
  }
  $forms = array();
  foreach ($this->forms as $form_id) {
    $forms[$form_id] = Botcha::getForm($form_id, FALSE);
  }
  return $forms;
}