namespace Org\Mxchange\CoreFramework\Helper;
// Import framework stuff
+use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
use Org\Mxchange\CoreFramework\Database\Frontend\User\UserDatabaseWrapper;
use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
use Org\Mxchange\CoreFramework\Generic\NullPointerException;
// Add HTML code
$formContent = sprintf("<form name=\"%s\" class=\"forms\" action=\"%s/%s\" method=\"%s\" target=\"%s\" id=\"%s_form\">",
$formName,
- $this->getConfigInstance()->getConfigEntry('base_url'),
- $this->getConfigInstance()->getConfigEntry('form_action'),
- $this->getConfigInstance()->getConfigEntry('form_method'),
- $this->getConfigInstance()->getConfigEntry('form_target'),
+ FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('base_url'),
+ FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('form_action'),
+ FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('form_method'),
+ FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('form_target'),
$formId
);
*/
public function addInputHiddenConfiguredField ($fieldName, $prefix) {
// Get the value from instance
- $fieldValue = $this->getConfigInstance()->getConfigEntry("{$prefix}_{$fieldName}");
+ $fieldValue = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry("{$prefix}_{$fieldName}");
//* DEBUG: */ print __METHOD__.':'.$fieldName.'='.$fieldValue."<br />\n";
// Add the text field
* @return $required Whether the email address is required
*/
public function ifRegisterRequiresEmailVerification () {
- $required = ($this->getConfigInstance()->getConfigEntry('register_requires_email') == 'Y');
+ $required = (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('register_requires_email') == 'Y');
return $required;
}
* @return $required Whether profile data shall be asked
*/
public function ifRegisterIncludesProfile () {
- $required = ($this->getConfigInstance()->getConfigEntry('register_includes_profile') == 'Y');
+ $required = (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('register_includes_profile') == 'Y');
return $required;
}
* @return $isSecured Whether this form is secured by a CAPTCHA
*/
public function ifFormSecuredWithCaptcha () {
- $isSecured = ($this->getConfigInstance()->getConfigEntry($this->getFormName() . '_captcha_secured') == 'Y');
+ $isSecured = (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry($this->getFormName() . '_captcha_secured') == 'Y');
return $isSecured;
}
* @return $required Whether personal data shall be asked
*/
public function ifRegisterIncludesPersonaData () {
- $required = ($this->getConfigInstance()->getConfigEntry('register_personal_data') == 'Y');
+ $required = (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('register_personal_data') == 'Y');
return $required;
}
* @return $required Whether birthday shall be asked
*/
public function ifProfileIncludesBirthDay () {
- $required = ($this->getConfigInstance()->getConfigEntry('profile_includes_birthday') == 'Y');
+ $required = (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('profile_includes_birthday') == 'Y');
return $required;
}
* @return $isUnique
*/
public function ifEmailMustBeUnique () {
- $isUnique = ($this->getConfigInstance()->getConfigEntry('register_email_unique') == 'Y');
+ $isUnique = (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('register_email_unique') == 'Y');
return $isUnique;
}
* @return $required Whether the specified chat protocol is enabled
*/
public function ifChatEnabled ($chatProtocol) {
- $required = ($this->getConfigInstance()->getConfigEntry('chat_enabled_' . $chatProtocol) == 'Y');
+ $required = (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('chat_enabled_' . $chatProtocol) == 'Y');
return $required;
}
* @return $isEnabled Whether the login is enabled or disabled
*/
public function ifLoginIsEnabled () {
- $isEnabled = ($this->getConfigInstance()->getConfigEntry('login_enabled') == 'Y');
+ $isEnabled = (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('login_enabled') == 'Y');
return $isEnabled;
}
* @return $isEnabled Whether the login shall be done by username
*/
public function ifLoginWithUsername () {
- $isEnabled = ($this->getConfigInstance()->getConfigEntry('login_type') == "username");
+ $isEnabled = (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('login_type') == "username");
return $isEnabled;
}
* @return $isEnabled Whether the login shall be done by email
*/
public function ifLoginWithEmail () {
- $isEnabled = ($this->getConfigInstance()->getConfigEntry('login_type') == "email");
+ $isEnabled = (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('login_type') == "email");
return $isEnabled;
}
* @return $isAllowed Whether guest login is allowed
*/
public function ifGuestLoginAllowed () {
- $isAllowed = ($this->getConfigInstance()->getConfigEntry('guest_login_allowed') == 'Y');
+ $isAllowed = (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('guest_login_allowed') == 'Y');
return $isAllowed;
}
* @return $requireConfirm Whether email change must be confirmed
*/
public function ifEmailChangeRequireConfirmation () {
- $requireConfirm = ($this->getConfigInstance()->getConfigEntry('email_change_confirmation') == 'Y');
+ $requireConfirm = (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('email_change_confirmation') == 'Y');
return $requireConfirm;
}
* @return $emailChange Whether changing email address is allowed
*/
public function ifEmailChangeAllowed () {
- $emailChange = ($this->getConfigInstance()->getConfigEntry('email_change_allowed') == 'Y');
+ $emailChange = (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('email_change_allowed') == 'Y');
return $emailChange;
}
* @return $isUnconfirmed Whether the user account is unconfirmed
*/
public function ifUserAccountUnconfirmed () {
- $isUnconfirmed = ($this->getValueField(UserDatabaseWrapper::DB_COLUMN_USER_STATUS) === $this->getConfigInstance()->getConfigEntry('user_status_unconfirmed'));
+ $isUnconfirmed = ($this->getValueField(UserDatabaseWrapper::DB_COLUMN_USER_STATUS) === FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('user_status_unconfirmed'));
return $isUnconfirmed;
}
* @return $isUnconfirmed Whether the user account is locked
*/
public function ifUserAccountLocked () {
- $isUnconfirmed = ($this->getValueField(UserDatabaseWrapper::DB_COLUMN_USER_STATUS) === $this->getConfigInstance()->getConfigEntry('user_status_locked'));
+ $isUnconfirmed = ($this->getValueField(UserDatabaseWrapper::DB_COLUMN_USER_STATUS) === FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('user_status_locked'));
return $isUnconfirmed;
}
* @return $isUnconfirmed Whether the user account is a guest
*/
public function ifUserAccountGuest () {
- $isUnconfirmed = ($this->getValueField(UserDatabaseWrapper::DB_COLUMN_USER_STATUS) === $this->getConfigInstance()->getConfigEntry('user_status_guest'));
+ $isUnconfirmed = ($this->getValueField(UserDatabaseWrapper::DB_COLUMN_USER_STATUS) === FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('user_status_guest'));
return $isUnconfirmed;
}
* @return $refillActive Whether the refill page is active
*/
public function ifRefillPageActive () {
- $refillActive = ($this->getConfigInstance()->getConfigEntry('refill_page_active') == 'Y');
+ $refillActive = (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('refill_page_active') == 'Y');
return $refillActive;
}