// or // // REMEMBER: THIS IS JUST AN EXAMPLE!!! Feel free to modify. public function RenderWithName($blnDisplayOutput = true) { //////////////////// // Call RenderHelper $this->RenderHelper(func_get_args(), __FUNCTION__); //////////////////// // Custom Render Functionality Here // Because this example RenderWithName will render a block-based element (e.g. a DIV), let's ensure // that IsBlockElement is set to true $this->blnIsBlockElement = true; // Render the Control's Dressing $strToReturn = '
'; // Render the Left side $strLeftClass = "left"; if ($this->blnRequired) $strLeftClass .= ' required'; if (!$this->blnEnabled) $strLeftClass .= ' disabled'; if ($this->strInstructions) $strInstructions = '
' . $this->strInstructions . ''; else $strInstructions = ''; $strToReturn .= sprintf('
%s
' , $strLeftClass, $this->strControlId, $this->strName, $strInstructions); // Render the Right side if ($this->strValidationError) $strMessage = sprintf('%s', $this->strValidationError); else if ($this->strWarning) $strMessage = sprintf('%s', $this->strWarning); else $strMessage = ''; try { $strToReturn .= sprintf('
%s%s%s%s
', $this->strHtmlBefore, $this->GetControlHtml(), $this->strHtmlAfter, $strMessage); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } $strToReturn .= '
'; //////////////////////////////////////////// // Call RenderOutput, Returning its Contents return $this->RenderOutput($strToReturn, $blnDisplayOutput); //////////////////////////////////////////// } } ?>