public function __get($strName) { switch ($strName) { case 'ShortDescriptionAsHtml': $strToReturn = QApplication::HtmlEntities(trim($this->strShortDescription)); $strToReturn = str_replace("\r", '', $strToReturn); $strToReturn = str_replace("\n", '<br/>', $strToReturn); return $strToReturn; case 'VariableType': if ($this->intVariableTypeId == VariableType::Object && $this->ObjectType) { $strToReturn = $this->ObjectType->Name; } else { $strToReturn = strtolower(VariableType::ToString($this->intVariableTypeId)); } if ($strToReturn == 'qdatetime') { $strToReturn = 'QDateTime'; } if ($this->blnArrayFlag) { $strToReturn .= '[]'; } return $strToReturn; case 'DisplayDefaultValue': if (is_null($this->strDefaultValue)) { return; } else { return ' = ' . $this->strDefaultValue; } default: try { return parent::__get($strName); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } } }
public function dtgVariable_VariableTypeId_Render(Variable $objVariable) { if (!is_null($objVariable->VariableTypeId)) { return VariableType::ToString($objVariable->VariableTypeId); } else { return null; } }