/**
  * Queries the params-array or the source-object for the mapped value.
  * If found in the params-array, the value will be used, otherwise
  * the source-objects' getter is invoked.
  */
 protected function updateValue()
 {
     $arrParams = class_carrier::getAllParams();
     if (isset($arrParams[$this->strEntryName])) {
         $this->setStrValue($arrParams[$this->strEntryName]);
     } else {
         $this->setStrValue($this->getValueFromObject());
     }
 }
 public function validateValue()
 {
     $objDate = new class_date("0");
     $arrParams = class_carrier::getAllParams();
     if (array_key_exists($this->getStrEntryName(), $arrParams)) {
         $objDate->generateDateFromParams($this->getStrEntryName(), $arrParams);
     } else {
         $objDate = new class_date($this->getStrValue());
     }
     return $this->getObjValidator()->validate($objDate);
 }
 protected function updateValue()
 {
     $arrParams = class_carrier::getAllParams();
     $strEntryName = $this->getStrEntryName();
     $strEntryNameEmpty = $strEntryName . "_empty";
     if (isset($arrParams[$strEntryName])) {
         $this->setStrValue($arrParams[$strEntryName]);
     } elseif (isset($arrParams[$strEntryNameEmpty])) {
         $this->setStrValue("");
     } else {
         $this->setStrValue($this->getValueFromObject());
     }
 }
 /**
  * Queries the params-array or the source-object for the mapped value.
  * If found in the params-array, the value will be used, otherwise
  * the source-objects' getter is invoked.
  */
 protected function updateValue()
 {
     $arrParams = class_carrier::getAllParams();
     if (isset($arrParams[$this->getStrEntryName()])) {
         $this->setStrValue(true);
     } else {
         if (count($_POST) > 0) {
             $this->setStrValue(false);
         } else {
             $this->setStrValue($this->getValueFromObject());
         }
     }
 }
Exemple #5
0
/**
 * Returns all params passed during startup by get, post or files
 *
 * @return array
 * @deprecated use class_carrier::getAllParams() instead
 * @see class_carrier::getAllParams()
 * @todo remove
 */
function getAllPassedParams()
{
    return class_carrier::getAllParams();
}
 /**
  * Returns the complete Params-Array
  *
  * @return mixed
  * @final
  */
 public final function getAllParams()
 {
     return class_carrier::getAllParams();
 }
 /**
  * @param class_admin_formgenerator $objForm
  *
  * @return bool
  */
 protected function checkAdditionalEditData(class_admin_formgenerator $objForm)
 {
     $arrParams = class_carrier::getAllParams();
     $bitPass = true;
     if (isset($arrParams["user_pass"])) {
         $bitPass = $this->checkPasswords($this->getParam("user_pass"), $this->getParam("user_pass2"));
         if (!$bitPass) {
             $objForm->addValidationError("password", $this->getLang("required_password_equal"));
         }
     }
     $arrUsers = class_module_user_user::getAllUsersByName($this->getParam("user_username"));
     if (count($arrUsers) > 0) {
         $objUser = $arrUsers[0];
         if ($objUser->getSystemid() != $this->getSystemid()) {
             $objForm->addValidationError("user_username", $this->getLang("required_user_existing"));
             $bitPass = false;
         }
     }
     return $bitPass;
 }
 /**
  * Returns the tags to close an open form.
  * Includes the hidden fields for a passed pe param and a passed pv param by default.
  *
  * @param bool $bitIncludePeFields
  *
  * @return string
  */
 public function formClose($bitIncludePeFields = true)
 {
     $strTemplateID = $this->objTemplate->readTemplate("/elements.tpl", "form_close");
     $strPeFields = "";
     if ($bitIncludePeFields) {
         $arrParams = class_carrier::getAllParams();
         if (array_key_exists("pe", $arrParams)) {
             $strPeFields .= $this->formInputHidden("pe", $arrParams["pe"]);
         }
         if (array_key_exists("folderview", $arrParams)) {
             $strPeFields .= $this->formInputHidden("folderview", $arrParams["folderview"]);
             if (!array_key_exists("pe", $arrParams)) {
                 $strPeFields .= $this->formInputHidden("pe", "1");
             }
         }
         if (array_key_exists("pv", $arrParams)) {
             $strPeFields .= $this->formInputHidden("pv", $arrParams["pv"]);
         }
     }
     return $strPeFields . $this->objTemplate->fillTemplate(array(), $strTemplateID);
 }
 public function validateValue()
 {
     if ($this->getBitMandatory()) {
         $arrParams = class_carrier::getAllParams();
         if (!array_key_exists($this->getStrEntryName() . self::DAY_SUFFIX, $arrParams) || !array_key_exists($this->getStrEntryName() . self::MONTH_SUFFIX, $arrParams) || !array_key_exists($this->getStrEntryName() . self::YEAR_SUFFIX, $arrParams)) {
             return false;
         }
     }
     return parent::validateValue();
 }