A QCodo powered CMS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
1.6 KiB

  1. /**
  2. * Create and setup QFloatTextBox <%= $strControlId %>
  3. * @param string $strControlId optional ControlId to use
  4. * @return QFloatTextBox
  5. */
  6. public function <%= $strControlId %>_Create($strControlId = null) {
  7. $this-><%= $strControlId %> = new QFloatTextBox($this->objParentObject, $strControlId);
  8. $this-><%= $strControlId %>->Name = QApplication::Translate('<%= QConvertNotation::WordsFromCamelCase($objColumn->PropertyName) %>');
  9. $this-><%= $strControlId %>->Text = $this-><%= $strObjectName %>-><%= $objColumn->PropertyName %>;
  10. <% if ($objColumn->NotNull) { %>
  11. $this-><%=$strControlId %>->Required = true;
  12. <% } %>
  13. return $this-><%= $strControlId %>;
  14. }
  15. /**
  16. * Create and setup QLabel <%= $strLabelId %>
  17. * @param string $strControlId optional ControlId to use
  18. * @param string $strFormat optional sprintf format to use
  19. * @return QLabel
  20. */
  21. public function <%= $strLabelId %>_Create($strControlId = null, $strFormat = null) {
  22. $this-><%= $strLabelId %> = new QLabel($this->objParentObject, $strControlId);
  23. $this-><%= $strLabelId %>->Name = QApplication::Translate('<%= QConvertNotation::WordsFromCamelCase($objColumn->PropertyName) %>');
  24. $this-><%= $strLabelId %>->Text = $this-><%= $strObjectName %>-><%= $objColumn->PropertyName %>;
  25. <% if ($objColumn->NotNull) { %>
  26. $this-><%=$strLabelId %>->Required = true;
  27. <% } %>
  28. $this-><%= $strLabelId %>->Format = $strFormat;
  29. return $this-><%= $strLabelId %>;
  30. }