Example #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);
 }
Example #2
0
 /**
  * Get the current action URL
  * @see framework\core\PathService::getFormActionURL()
  * @param boolean $isDirective Determine if using a directory or just query string in the URL.
  */
 public function getCurrentActionURL($isDirective = False)
 {
     $moduleName = MvcReg::getModuleName();
     $controllerName = MvcReg::getControllerName();
     $actionName = MvcReg::getActionName();
     $url = PathService::getFormActionURL($moduleName, $controllerName, $actionName, null, $isDirective);
     return $url;
 }