You are here

public function BotchaRecipebookNone::__construct in BOTCHA Spam Prevention 7.3

Same name and namespace in other branches
  1. 6.2 controller/botcha_recipebook.controller.inc \BotchaRecipebookNone::__construct()
  2. 6.3 controller/recipebook/botcha.recipebook.controller.inc \BotchaRecipebookNone::__construct()
  3. 7.2 controller/botcha_recipebook.controller.inc \BotchaRecipebookNone::__construct()

Overrides BotchaRecipebook::__construct

File

controller/recipebook/botcha.recipebook.controller.inc, line 338
Controller layer of the BotchaRecipebook objects.

Class

BotchaRecipebookNone
Dummy class, created for data consistency and for interface unifying. When there is no recipe book binded to form, this class is used as a handler. It has no logic at all - by design.

Code

public function __construct($id = NULL) {
  $this->id = !empty($id) ? $id : 'none';
  $this
    ->setTitle('None');
  $this
    ->setDescription('Help class: "Null object" pattern.');
}