You are here

public function BotchaForm::getRecipebook in BOTCHA Spam Prevention 7.3

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

@todo BotchaForm getRecipebook Description.

Return value

BotchaRecipebook

1 call to BotchaForm::getRecipebook()
BotchaForm::createAdminLinksFieldset in controller/form/botcha.form.controller.inc
1 method overrides BotchaForm::getRecipebook()
BotchaFormNone::getRecipebook in controller/form/botcha.form.controller.inc
@todo BotchaForm getRecipebook Description.

File

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

Class

BotchaForm

Code

public function getRecipebook() {
  if (!isset($this->recipebook)) {
    $rbs = BotchaModel::getRecipebooksForms(array(
      'mode' => 'recipebook',
      'forms' => $this->id,
    ));

    // In fact there is not more than 1 item.
    // @todo Remove hardcode.
    $this->recipebook = !empty($rbs) ? current($rbs) : 'none';
  }
  return $this->recipebook;
}