const EXCEPTION_UNEXPECTED_CLOSED_GROUP = 0xb03;
/**
- * Private constructor
+ * Protected constructor
*
* @return void
*/
parent::__construct(__CLASS__);
// Set part description
- $this->setObjectDescription("HTML-Formularhilfsklasse");
+ $this->setObjectDescription("Helper class for HTML forms");
+
+ // Create unique ID number
+ $this->createUniqueID();
}
/**
// Add HTML code
$formContent = sprintf("<form name=\"%s\" class=\"forms\" action=\"%s\" method=\"%s\" target=\"%s\"",
$formName,
- $this->getConfigInstance()->readConfig("form_action"),
- $this->getConfigInstance()->readConfig("form_method"),
- $this->getConfigInstance()->readConfig("form_target")
+ $this->getConfigInstance()->readConfig('form_action'),
+ $this->getConfigInstance()->readConfig('form_method'),
+ $this->getConfigInstance()->readConfig('form_target')
);
// Is the form id set?
$this->formName = $formName;
} else {
// Add the hidden field required to identify safely this form
- $this->addInputHiddenField("form", $this->formName);
+ $this->addInputHiddenField('form', $this->formName);
// Is a group open?
if ($this->groupOpened === true) {
* @return $required Wether the email address is required
*/
public function ifRegisterRequiresEmailVerification () {
- $required = ($this->getConfigInstance()->readConfig("register_requires_email") == "Y");
+ $required = ($this->getConfigInstance()->readConfig('register_requires_email') == "Y");
return $required;
}
* @return $required Wether profile shall be asked
*/
public function ifRegisterIncludesProfile () {
- $required = ($this->getConfigInstance()->readConfig("register_includes_profile") == "Y");
+ $required = ($this->getConfigInstance()->readConfig('register_includes_profile') == "Y");
return $required;
}
* @return $required Wether personal data shall be asked
*/
public function ifRegisterIncludesPersonaData () {
- $required = ($this->getConfigInstance()->readConfig("register_personal_data") == "Y");
+ $required = ($this->getConfigInstance()->readConfig('register_personal_data') == "Y");
return $required;
}
+ /**
+ * Checks wether email addresses can only be once used
+ *
+ * @return $isUnique
+ */
+ public function ifEmailMustBeUnique () {
+ $isUnique = ($this->getConfigInstance()->readConfig('register_email_unique') == "Y");
+ return $isUnique;
+ }
+
/**
* Checks wether the specified chat protocol is enabled in this form
*