Esempio n. 1
0
 /**
  * Constructor of the class.
  * @param string $formId
  * @param string $formName
  * @param string $uidLabel
  * @param string $pwdLabel
  * @param string $moduleName
  * @param string $formDecoration
  * @param string $loginMsgId
  * @param string $formAction
  */
 public function __construct($formId = null, $formName = null, $uidLabel = null, $pwdLabel = null, $moduleName = null, $formDecoration = null, $loginMsgId = null, $formAction = null)
 {
     $this->_formId = is_null($formId) ? self::DEFAULT_LOGIN_FORM_ID : $formId;
     $formName = is_null($formName) ? $this->_formId : $formName;
     $this->_loginMsgId = is_null($loginMsgId) ? self::DEFAULT_LOEGIN_MESSAGE_ID : $loginMsgId;
     parent::__construct($formId);
     $moduleName = !is_null($moduleName) ? $moduleName : MvcReg::getModuleName();
     $signInActionName = Authentication::getSignInAction($moduleName);
     $loginControllerName = Authentication::getLoginController($moduleName);
     $formAction = is_null($formAction) ? PathService::getFormActionURL($moduleName, $loginControllerName, $signInActionName) : $formAction;
     if (is_null($uidLabel) || $uidLabel == "") {
         $uidLabel = self::DEFAULT_UID;
     }
     if (is_null($pwdLabel) || $pwdLabel == "") {
         $pwdLabel = self::DEFAULT_PWD;
     }
     $this->_formDecoration = $formDecoration;
     $this->createForm($formAction, $this->_formId, $formName, $uidLabel, $pwdLabel, $moduleName, $this->_loginMsgId);
 }