コード例 #1
0
 /**
  * @param $strValue
  * @return class_formentry_base
  */
 public function setStrValue($strValue)
 {
     $arrTargetValues = array();
     if ((is_array($strValue) || $strValue instanceof ArrayObject) && count($strValue) > 0) {
         foreach ($strValue as $strKey => $strSingleValue) {
             //DB vals
             if (is_object($strSingleValue)) {
                 $arrTargetValues[] = $strSingleValue->getSystemid();
             } else {
                 if ($strSingleValue == "checked") {
                     $arrTargetValues[] = $strKey;
                 }
             }
         }
     }
     return parent::setStrValue($arrTargetValues);
 }
コード例 #2
0
 public function setStrValue($strValue)
 {
     $arrValuesIds = array();
     if (is_array($strValue) || $strValue instanceof Traversable) {
         foreach ($strValue as $objValue) {
             if ($objValue instanceof class_model) {
                 $arrValuesIds[] = $objValue->getStrSystemid();
             } else {
                 $arrValuesIds[] = $objValue;
             }
         }
     }
     $strValue = implode(",", $arrValuesIds);
     $objReturn = parent::setStrValue($strValue);
     $this->setArrKeyValues($this->toObjectArray());
     return $objReturn;
 }
コード例 #3
0
 /**
  * @param $strValue
  * @return class_formentry_base
  */
 public function setStrValue($strValue)
 {
     parent::setStrValue($strValue != false);
     return $this;
 }