public function RenderTableForVariables($objVariableArray) { $strBackgroundColor = 'style="background-color: #eee0fa;"'; foreach ($objVariableArray as $objVariable) { $strName = $objVariable->Variable->Name; if (QApplication::$Login) { $strName .= ' <a href="/edit_variable.php/' . $objVariable->Id . '" class="class_property_link" title="Edit">Edit</a>'; } switch ($objVariable->InheritenceState) { case InheritenceState::Interited: $strClass = ' class_property_inherited'; $strDetails = '<br/><span style="color: #999999;">Inherits From: </span><b>' . $objVariable->QcodoClass->Name . '</b>'; break; case InheritenceState::Overrides: $strClass = ' class_property_overrides'; $strDetails = '<br/><span style="color: #999999;">Overrides: </span><b>' . $objVariable->OverridesVariable->QcodoClass->Name . '</b>'; break; default: $strClass = null; $strDetails = null; } if ($objVariable->StaticFlag) { $strDetails = 'Static: </span><b>Yes</b><br/><span style="color: #999999;">Protection Level: </span><b>' . ProtectionType::ToString($objVariable->ProtectionTypeId) . '</b>' . $strDetails; } else { $strDetails = 'Protection Level: </span><b>' . ProtectionType::ToString($objVariable->ProtectionTypeId) . '</b>' . $strDetails; } $strName .= '<div class="class_methods_detail"><span style="color: #999999;">' . $strDetails . '</div>'; $strType = $objVariable->Variable->VariableType; if ($objVariable->ReadOnlyFlag) { $strType .= '<br/><span class="class_property_subspan">(Read-Only)</span>'; } $strValue = $objVariable->Variable->DefaultValue; $strDescription = $objVariable->Variable->ShortDescriptionAsHtml; ?> <tr> <td class="class_property_name<?php _p($strClass); ?> "><?php _p($strName, false); ?> </td> <td class="class_property_type"><?php _p($strType, false); ?> </td> <td class="class_property_value"><?php _p($strValue, false); ?> </td> <td class="class_property_description"><?php _p($strDescription, false); ?> </td> </tr> <?php } }
public function dtgOperation_ProtectionTypeId_Render(Operation $objOperation) { if (!is_null($objOperation->ProtectionTypeId)) { return ProtectionType::ToString($objOperation->ProtectionTypeId); } else { return null; } }
public function RenderTableForOperations($objOperationArray, $blnReference = false) { foreach ($objOperationArray as $objOperation) { $strProtection = ($objOperation->FinalFlag ? 'Final ' : '') . ProtectionType::ToString($objOperation->ProtectionTypeId); if (substr($objOperation->Name, 0, 2) == '__') { $strBackgroundClass = 'class_methods_magic'; } else { $strBackgroundClass = 'class_methods_' . strtolower(ProtectionType::ToString($objOperation->ProtectionTypeId)); } $strReturns = $objOperation->ReturnVariableId ? $objOperation->ReturnVariable->VariableType : 'none'; $strAction = $this->objForm->RenderLink(null, null, $this->objQcodoClass->Id, 'm', $objOperation->Id); switch ($objOperation->InheritenceState) { case InheritenceState::Interited: $strInheritenceImage = '<br/><img src="/images/inherited.png" alt="Inherited"/>'; $strInheritenceInfo = sprintf('<span style="color: #666666;">Inherits From: </span><b><span onclick="%s; return qc.terminateEvent(event);" onmouseover="this.style.textDecoration=\'underline\'" onmouseout="this.style.textDecoration=\'none\'" title="%s">%s</span></b><span style="color: #666666;">; ', $this->objForm->RenderLink(null, null, $objOperation->QcodoClassId, 'm'), $objOperation->QcodoClass->Name, $objOperation->QcodoClass->Name); $strBackgroundClass .= '_inherited'; $strBackgroundClassAdded = '_inherited'; break; case InheritenceState::Overrides: $strInheritenceImage = '<br/><img src="/images/overrides.png" alt="Overrides"/>'; $strInheritenceInfo = sprintf('<span style="color: #666666;">Overrides: </span><b><span onclick="%s; return qc.terminateEvent(event);" onmouseover="this.style.textDecoration=\'underline\'" onmouseout="this.style.textDecoration=\'none\'" title="%s">%s</span></b><span style="color: #666666;">; ', $this->objForm->RenderLink(null, null, $objOperation->OverridesOperation->QcodoClassId, 'm'), $objOperation->OverridesOperation->QcodoClass->Name, $objOperation->OverridesOperation->QcodoClass->Name); $strBackgroundClass .= '_overrides'; $strBackgroundClassAdded = '_overrides'; break; default: $strInheritenceImage = ''; $strInheritenceInfo = '<span style="color: #666666;">'; $strBackgroundClassAdded = ''; break; } $strParameterArray = array(); foreach ($objOperation->Parameters as $objParameter) { $strParameter = $objParameter->Variable->VariableType; $strParameter .= ' <b style="color: #000000;">'; if ($objParameter->ReferenceFlag) { $strParameter .= '&'; } $strParameter .= '$' . $objParameter->Variable->Name . '</b>'; $strParameter .= $objParameter->Variable->DisplayDefaultValue; array_push($strParameterArray, $strParameter); } $strAdditional = ''; if ($objOperation->AdditionalVariable) { if (count($strParameterArray)) { $strAdditional = ' <span style="color: #000000;">[,</span> '; } else { $strAdditional = ' <span style="color: #000000;">[</span>'; } $strAdditional .= $objOperation->AdditionalVariable->VariableType . ' <b style="color: #000000;">additional</b> <span style="color: #000000;">[,</span> ' . $objOperation->AdditionalVariable->VariableType . ' <span style="color: #000000;"><b>...</b>]]</span>'; } if ($objOperation->ShortDescription) { $strText = '<div class="class_methods_description">' . $objOperation->ShortDescriptionAsHtml . '</div>'; } else { $strText = ''; } ?> <div class="class_methods_div <?php _p($strBackgroundClass); ?> " title="<?php _p($objOperation->Name); ?> " onmouseover="this.className='class_methods_div class_methods_hover<?php _p($strBackgroundClassAdded); ?> '" onmouseout="this.className='class_methods_div <?php _p($strBackgroundClass); ?> '" onclick="<?php _p($strAction); ?> "> <span class="class_methods_name"><?php _p($objOperation->Name); ?> </span> (<span class="class_methods_params"><?php _p(implode('<span style="color: #000000;">,</span> ', $strParameterArray) . $strAdditional, false); ?> </span>)<br/> <div class="class_methods_detail"> <?php _p($strInheritenceInfo, false); ?> Return: </span><b><?php _p($strReturns); ?> </b><span style="color: #666666;">; Protection: </span><b><?php _p($strProtection); ?> </b> </div> <?php _p($strText, false); ?> </div> <?php } }
_p($_CONTROL->strShortDescriptionHtml, false); ?> <br/><br/> <div class="class_method_name"> Details <div class="class_method_version"> <?php _p($_CONTROL->strOverrides, false); ?> Method Type: <b><?php _p($_CONTROL->strMethodType); ?> </b><br/> Protection: <b><?php _p($objOperation->FinalFlag ? 'Final ' : '' . ProtectionType::ToString($objOperation->ProtectionTypeId)); ?> </b><br/> Version: <b><?php _p($_CONTROL->strVersion); ?> </b> </div> </div> <?php _p($_CONTROL->RenderTableForParameters($objOperation), false); ?> <?php _p($_CONTROL->strLongDescriptionHtml, false); ?>
public function dtgClassVariable_ProtectionTypeId_Render(ClassVariable $objClassVariable) { if (!is_null($objClassVariable->ProtectionTypeId)) { return ProtectionType::ToString($objClassVariable->ProtectionTypeId); } else { return null; } }