/** * @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); }
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; }
/** * @param $strValue * @return class_formentry_base */ public function setStrValue($strValue) { parent::setStrValue($strValue != false); return $this; }