本文整理汇总了PHP中QQN::QcodoClass方法的典型用法代码示例。如果您正苦于以下问题:PHP QQN::QcodoClass方法的具体用法?PHP QQN::QcodoClass怎么用?PHP QQN::QcodoClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QQN
的用法示例。
在下文中一共展示了QQN::QcodoClass方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct(QcodoClass $objClass, $objParentControl, $strControlId = null)
{
parent::__construct($objParentControl, $strControlId);
$this->objQcodoClass = $objClass;
$this->strTemplate = 'ClassPanel.tpl.php';
$this->strUrl = 'http://' . $_SERVER['HTTP_HOST'] . '/index.php/' . $this->objQcodoClass->Name;
$this->strShortDescriptionHtml = $this->objQcodoClass->ShortDescriptionAsHtml;
if (!$this->strShortDescriptionHtml) {
$this->strShortDescriptionHtml = '<span style="color: #888888;"><i>No description entered yet.</i></span>';
}
$this->strLongDescriptionHtml = QWriteBox::DisplayHtml($this->objQcodoClass->ExtendedDescription, 'writebox_code');
$this->strVersion = 'Qcodo >= ' . $this->objQcodoClass->FirstVersion;
if ($this->objQcodoClass->LastVersion) {
$this->strVersion .= ' - Deprecated as of ' . $this->objQcodoClass->LastVersion;
}
$this->strParentClassArray[$objClass->Id] = $objClass->DisplayName;
$objParentClass = $objClass->ParentQcodoClass;
while ($objParentClass) {
$this->strParentClassArray[$objParentClass->Id] = $objParentClass->DisplayName;
$objParentClass = $objParentClass->ParentQcodoClass;
}
$this->strParentClassArray = array_reverse($this->strParentClassArray, true);
foreach ($this->objQcodoClass->GetChildQcodoClassArray(QQ::Clause(QQ::OrderBy(QQN::QcodoClass()->Name))) as $objChildClass) {
$this->strChildClassArray[$objChildClass->Id] = $objChildClass->DisplayName;
}
if (QApplication::$Login) {
$this->strEditLink = '<div class="edit_link" title="Edit" onclick="document.location=\'/edit_class.php/';
$this->strEditLink .= $this->objQcodoClass->Id;
$this->strEditLink .= '\'">EDIT</div>';
}
}
示例2: __construct
public function __construct($objParentObject, $strSetEditPanelMethod, $strCloseEditPanelMethod, $strControlId = null)
{
// Call the Parent
try {
parent::__construct($objParentObject, $strControlId);
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
// Record Method Callbacks
$this->strSetEditPanelMethod = $strSetEditPanelMethod;
$this->strCloseEditPanelMethod = $strCloseEditPanelMethod;
// Setup DataGrid Columns
$this->colEditLinkColumn = new QDataGridColumn(QApplication::Translate('Edit'), '<?= $_CONTROL->ParentControl->dtgQcodoClass_EditLinkColumn_Render($_ITEM) ?>');
$this->colEditLinkColumn->HtmlEntities = false;
$this->colId = new QDataGridColumn(QApplication::Translate('Id'), '<?= $_ITEM->Id; ?>', array('OrderByClause' => QQ::OrderBy(QQN::QcodoClass()->Id), 'ReverseOrderByClause' => QQ::OrderBy(QQN::QcodoClass()->Id, false)));
$this->colParentQcodoClassId = new QDataGridColumn(QApplication::Translate('Parent Qcodo Class Id'), '<?= $_CONTROL->ParentControl->dtgQcodoClass_ParentQcodoClass_Render($_ITEM); ?>');
$this->colInterfaceId = new QDataGridColumn(QApplication::Translate('Interface Id'), '<?= $_CONTROL->ParentControl->dtgQcodoClass_Interface_Render($_ITEM); ?>');
$this->colClassGroupId = new QDataGridColumn(QApplication::Translate('Class Group Id'), '<?= $_CONTROL->ParentControl->dtgQcodoClass_ClassGroup_Render($_ITEM); ?>');
$this->colName = new QDataGridColumn(QApplication::Translate('Name'), '<?= QString::Truncate($_ITEM->Name, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::QcodoClass()->Name), 'ReverseOrderByClause' => QQ::OrderBy(QQN::QcodoClass()->Name, false)));
$this->colAbstractFlag = new QDataGridColumn(QApplication::Translate('Abstract Flag'), '<?= ($_ITEM->AbstractFlag) ? "true" : "false" ?>', array('OrderByClause' => QQ::OrderBy(QQN::QcodoClass()->AbstractFlag), 'ReverseOrderByClause' => QQ::OrderBy(QQN::QcodoClass()->AbstractFlag, false)));
$this->colEnumerationFlag = new QDataGridColumn(QApplication::Translate('Enumeration Flag'), '<?= ($_ITEM->EnumerationFlag) ? "true" : "false" ?>', array('OrderByClause' => QQ::OrderBy(QQN::QcodoClass()->EnumerationFlag), 'ReverseOrderByClause' => QQ::OrderBy(QQN::QcodoClass()->EnumerationFlag, false)));
$this->colFirstVersion = new QDataGridColumn(QApplication::Translate('First Version'), '<?= QString::Truncate($_ITEM->FirstVersion, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::QcodoClass()->FirstVersion), 'ReverseOrderByClause' => QQ::OrderBy(QQN::QcodoClass()->FirstVersion, false)));
$this->colLastVersion = new QDataGridColumn(QApplication::Translate('Last Version'), '<?= QString::Truncate($_ITEM->LastVersion, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::QcodoClass()->LastVersion), 'ReverseOrderByClause' => QQ::OrderBy(QQN::QcodoClass()->LastVersion, false)));
$this->colShortDescription = new QDataGridColumn(QApplication::Translate('Short Description'), '<?= QString::Truncate($_ITEM->ShortDescription, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::QcodoClass()->ShortDescription), 'ReverseOrderByClause' => QQ::OrderBy(QQN::QcodoClass()->ShortDescription, false)));
$this->colExtendedDescription = new QDataGridColumn(QApplication::Translate('Extended Description'), '<?= QString::Truncate($_ITEM->ExtendedDescription, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::QcodoClass()->ExtendedDescription), 'ReverseOrderByClause' => QQ::OrderBy(QQN::QcodoClass()->ExtendedDescription, false)));
$this->colFileId = new QDataGridColumn(QApplication::Translate('File Id'), '<?= $_CONTROL->ParentControl->dtgQcodoClass_File_Render($_ITEM); ?>');
// Setup DataGrid
$this->dtgQcodoClass = new QDataGrid($this);
$this->dtgQcodoClass->CellSpacing = 0;
$this->dtgQcodoClass->CellPadding = 4;
$this->dtgQcodoClass->BorderStyle = QBorderStyle::Solid;
$this->dtgQcodoClass->BorderWidth = 1;
$this->dtgQcodoClass->GridLines = QGridLines::Both;
// Datagrid Paginator
$this->dtgQcodoClass->Paginator = new QPaginator($this->dtgQcodoClass);
$this->dtgQcodoClass->ItemsPerPage = 10;
// Specify Whether or Not to Refresh using Ajax
$this->dtgQcodoClass->UseAjax = true;
// Specify the local databind method this datagrid will use
$this->dtgQcodoClass->SetDataBinder('dtgQcodoClass_Bind', $this);
$this->dtgQcodoClass->AddColumn($this->colEditLinkColumn);
$this->dtgQcodoClass->AddColumn($this->colId);
$this->dtgQcodoClass->AddColumn($this->colParentQcodoClassId);
$this->dtgQcodoClass->AddColumn($this->colInterfaceId);
$this->dtgQcodoClass->AddColumn($this->colClassGroupId);
$this->dtgQcodoClass->AddColumn($this->colName);
$this->dtgQcodoClass->AddColumn($this->colAbstractFlag);
$this->dtgQcodoClass->AddColumn($this->colEnumerationFlag);
$this->dtgQcodoClass->AddColumn($this->colFirstVersion);
$this->dtgQcodoClass->AddColumn($this->colLastVersion);
$this->dtgQcodoClass->AddColumn($this->colShortDescription);
$this->dtgQcodoClass->AddColumn($this->colExtendedDescription);
$this->dtgQcodoClass->AddColumn($this->colFileId);
// Setup the Create New button
$this->btnCreateNew = new QButton($this);
$this->btnCreateNew->Text = QApplication::Translate('Create a New') . ' ' . QApplication::Translate('QcodoClass');
$this->btnCreateNew->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnCreateNew_Click'));
}
示例3: __construct
public function __construct($objParentObject, $objVariableOrParameter, $blnDefaultValueEditable, $blnShowExtendedDescription, $strControlId = null)
{
// First, call the parent to do most of the basic setup
try {
parent::__construct($objParentObject, $strControlId);
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
if ($objVariableOrParameter instanceof Parameter) {
$this->objParameter = $objVariableOrParameter;
$this->objVariable = $this->objParameter->Variable;
$blnShowReference = true;
} else {
$this->objVariable = $objVariableOrParameter;
$blnShowReference = false;
}
// Setup Local Variables
$this->strName = $this->objVariable->Name;
// Next, we'll create our local subcontrols. Make sure to set "this" as these subcontrols' parent.
$this->lstVariableType = new QListBox($this);
$this->lstVariableType->Name = $this->strName . ' Variable Type';
$this->lstVariableType->CssClass .= ' vctl';
foreach (VariableType::$NameArray as $intId => $strName) {
$this->lstVariableType->AddItem($strName, $intId, $this->objVariable->VariableTypeId == $intId);
}
$this->lstObjectType = new QListBox($this);
$this->lstObjectType->Name = 'Object Type';
$this->lstObjectType->AddItem('- Unspecified -', null);
$this->lstObjectType->CssClass .= ' vctl';
foreach (QcodoClass::LoadAll(QQ::Clause(QQ::OrderBy(QQN::QcodoClass()->Name))) as $objQcodoClass) {
$this->lstObjectType->AddItem($objQcodoClass->Name, $objQcodoClass->Id, $this->objVariable->ObjectTypeId == $objQcodoClass->Id);
}
$this->chkArray = new QCheckBox($this);
$this->chkArray->Name = $this->strName . ' is an Array?';
$this->chkArray->Checked = $this->objVariable->ArrayFlag;
$this->chkReference = new QCheckBox($this);
$this->chkReference->Visible = $blnShowReference;
if ($this->objParameter) {
$this->chkReference->Checked = $this->objParameter->ReferenceFlag;
}
$this->txtDefaultValue = new QTextBox($this);
$this->txtDefaultValue->Name = $this->strName . ' Default Value';
$this->txtDefaultValue->Text = $this->objVariable->DefaultValue;
$this->txtDefaultValue->Enabled = $blnDefaultValueEditable;
$this->txtDefaultValue->CssClass .= ' vctl';
$this->txtShortDescription = new QTextBox($this);
$this->txtShortDescription->Name = $this->strName . ' Short Description';
$this->txtShortDescription->Text = $this->objVariable->ShortDescription;
$this->txtShortDescription->TextMode = QTextMode::MultiLine;
$this->txtShortDescription->CssClass = 'textbox_multiline';
$this->txtExtendedDescription = new QWriteBox($this);
$this->txtExtendedDescription->Name = $this->strName . ' Extended Description';
$this->txtExtendedDescription->Text = $this->objVariable->ExtendedDescription;
$this->txtExtendedDescription->CssClass = 'textbox_multiline';
$this->txtExtendedDescription->Visible = $blnShowExtendedDescription;
$this->lstVariableType->AddAction(new QChangeEvent(), new QAjaxControlAction($this, 'lstVariableType_Change'));
$this->lstVariableType_Change();
}
示例4: Form_Create
protected function Form_Create()
{
// Setup DataGrid Columns
$this->colEditLinkColumn = new QDataGridColumn(QApplication::Translate('Edit'), '<?= $_FORM->dtgQcodoClass_EditLinkColumn_Render($_ITEM) ?>');
$this->colEditLinkColumn->HtmlEntities = false;
$this->colId = new QDataGridColumn(QApplication::Translate('Id'), '<?= $_ITEM->Id; ?>', array('OrderByClause' => QQ::OrderBy(QQN::QcodoClass()->Id), 'ReverseOrderByClause' => QQ::OrderBy(QQN::QcodoClass()->Id, false)));
$this->colParentQcodoClassId = new QDataGridColumn(QApplication::Translate('Parent Qcodo Class Id'), '<?= $_FORM->dtgQcodoClass_ParentQcodoClass_Render($_ITEM); ?>');
$this->colInterfaceId = new QDataGridColumn(QApplication::Translate('Interface Id'), '<?= $_FORM->dtgQcodoClass_Interface_Render($_ITEM); ?>');
$this->colClassGroupId = new QDataGridColumn(QApplication::Translate('Class Group Id'), '<?= $_FORM->dtgQcodoClass_ClassGroup_Render($_ITEM); ?>');
$this->colName = new QDataGridColumn(QApplication::Translate('Name'), '<?= QString::Truncate($_ITEM->Name, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::QcodoClass()->Name), 'ReverseOrderByClause' => QQ::OrderBy(QQN::QcodoClass()->Name, false)));
$this->colAbstractFlag = new QDataGridColumn(QApplication::Translate('Abstract Flag'), '<?= ($_ITEM->AbstractFlag) ? "true" : "false" ?>', array('OrderByClause' => QQ::OrderBy(QQN::QcodoClass()->AbstractFlag), 'ReverseOrderByClause' => QQ::OrderBy(QQN::QcodoClass()->AbstractFlag, false)));
$this->colEnumerationFlag = new QDataGridColumn(QApplication::Translate('Enumeration Flag'), '<?= ($_ITEM->EnumerationFlag) ? "true" : "false" ?>', array('OrderByClause' => QQ::OrderBy(QQN::QcodoClass()->EnumerationFlag), 'ReverseOrderByClause' => QQ::OrderBy(QQN::QcodoClass()->EnumerationFlag, false)));
$this->colFirstVersion = new QDataGridColumn(QApplication::Translate('First Version'), '<?= QString::Truncate($_ITEM->FirstVersion, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::QcodoClass()->FirstVersion), 'ReverseOrderByClause' => QQ::OrderBy(QQN::QcodoClass()->FirstVersion, false)));
$this->colLastVersion = new QDataGridColumn(QApplication::Translate('Last Version'), '<?= QString::Truncate($_ITEM->LastVersion, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::QcodoClass()->LastVersion), 'ReverseOrderByClause' => QQ::OrderBy(QQN::QcodoClass()->LastVersion, false)));
$this->colShortDescription = new QDataGridColumn(QApplication::Translate('Short Description'), '<?= QString::Truncate($_ITEM->ShortDescription, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::QcodoClass()->ShortDescription), 'ReverseOrderByClause' => QQ::OrderBy(QQN::QcodoClass()->ShortDescription, false)));
$this->colExtendedDescription = new QDataGridColumn(QApplication::Translate('Extended Description'), '<?= QString::Truncate($_ITEM->ExtendedDescription, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::QcodoClass()->ExtendedDescription), 'ReverseOrderByClause' => QQ::OrderBy(QQN::QcodoClass()->ExtendedDescription, false)));
$this->colFileId = new QDataGridColumn(QApplication::Translate('File Id'), '<?= $_FORM->dtgQcodoClass_File_Render($_ITEM); ?>');
// Setup DataGrid
$this->dtgQcodoClass = new QDataGrid($this);
$this->dtgQcodoClass->CellSpacing = 0;
$this->dtgQcodoClass->CellPadding = 4;
$this->dtgQcodoClass->BorderStyle = QBorderStyle::Solid;
$this->dtgQcodoClass->BorderWidth = 1;
$this->dtgQcodoClass->GridLines = QGridLines::Both;
// Datagrid Paginator
$this->dtgQcodoClass->Paginator = new QPaginator($this->dtgQcodoClass);
$this->dtgQcodoClass->ItemsPerPage = 10;
// Specify Whether or Not to Refresh using Ajax
$this->dtgQcodoClass->UseAjax = false;
// Specify the local databind method this datagrid will use
$this->dtgQcodoClass->SetDataBinder('dtgQcodoClass_Bind');
$this->dtgQcodoClass->AddColumn($this->colEditLinkColumn);
$this->dtgQcodoClass->AddColumn($this->colId);
$this->dtgQcodoClass->AddColumn($this->colParentQcodoClassId);
$this->dtgQcodoClass->AddColumn($this->colInterfaceId);
$this->dtgQcodoClass->AddColumn($this->colClassGroupId);
$this->dtgQcodoClass->AddColumn($this->colName);
$this->dtgQcodoClass->AddColumn($this->colAbstractFlag);
$this->dtgQcodoClass->AddColumn($this->colEnumerationFlag);
$this->dtgQcodoClass->AddColumn($this->colFirstVersion);
$this->dtgQcodoClass->AddColumn($this->colLastVersion);
$this->dtgQcodoClass->AddColumn($this->colShortDescription);
$this->dtgQcodoClass->AddColumn($this->colExtendedDescription);
$this->dtgQcodoClass->AddColumn($this->colFileId);
}
示例5: Form_Create
protected function Form_Create()
{
$this->btnThis = new QButton($this);
$this->btnThis->AddAction(new QClickEvent(), new QServerAction());
$this->objDefaultWaitIcon = new QWaitIcon($this, 'spinner');
$this->pnlDocumentation = new QPanel($this);
$this->pnlDocumentation->AutoRenderChildren = true;
$this->lblSelector = new QLabel($this, 'lblSelector');
$this->lblSelector->AddAction(new QChangeEvent(), new QAjaxAction('lblSelector_Change'));
$this->tnvNavigation = new QTreeNav($this);
$this->tnvNavigation->ItemWidth = 350;
foreach (ClassGroup::LoadAll(QQ::Clause(QQ::OrderBy(QQN::ClassGroup()->OrderNumber))) as $objGroup) {
$objGroupItem = new QTreeNavItem($objGroup->Name, null, false, $this->tnvNavigation, 'g' . $objGroup->Id);
foreach ($objGroup->GetQcodoClassArray(QQ::Clause(QQ::OrderBy(QQN::QcodoClass()->Name))) as $objClass) {
$objItem = new TreeNavItemCustom($objClass->DisplayName, $objClass->Id, false, $objGroupItem, $objClass->Id);
if ($objClass->FileId) {
if (!$objClass->EnumerationFlag) {
$objItemMethods = new QTreeNavItem('Methods', $objClass->Id . 'm', false, $objItem, $objClass->Id . 'm');
$objItemProperties = new QTreeNavItem('Properties', $objClass->Id . 'p', false, $objItem, $objClass->Id . 'p');
$objItemVariables = new QTreeNavItem('Member Variables', $objClass->Id . 'v', false, $objItem, $objClass->Id . 'v');
}
if ($objClass->CountQcodoConstants()) {
$objItemConstants = new QTreeNavItem('Constants', $objClass->Id . 'c', false, $objItem, $objClass->Id . 'c');
}
}
}
}
$this->tnvNavigation->AddAction(new QChangeEvent(), new QAjaxAction('tnvNavigation_Change'));
if (QApplication::PathInfo(0)) {
$this->SelectItem($this->GetItemId(QApplication::PathInfo(0), QApplication::PathInfo(1), QApplication::PathInfo(2)));
}
if (QApplication::$LoginForDisplay) {
$this->strMembershipInfo = 'Welcome, ' . QApplication::$LoginForDisplay->__toString() . '<br/>';
$this->strMembershipInfo .= '<a href="http://www.qcodo.com/members/index.php/1" class="top_member_nav_link">Log Out</a> | <a href="http://www.qcodo.com/members/profile.php?strReturn=%2Fdocumentation" class="top_member_nav_link">My Profile</a>';
} else {
$this->strMembershipInfo = 'Welcome, Qcodo Guest<br/>';
$this->strMembershipInfo .= '<a href="http://www.qcodo.com/members/?strReturn=%2Fdocumentation" class="top_member_nav_link">Log In</a> | <a href="http://www.qcodo.com/members/register.php?strReturn=%2Fdocumentation" class="top_member_nav_link">Register</a>';
}
}
示例6: CountByFileId
/**
* Count QcodoClasses
* by FileId Index(es)
* @param integer $intFileId
* @return int
*/
public static function CountByFileId($intFileId)
{
// Call QcodoClass::QueryCount to perform the CountByFileId query
return QcodoClass::QueryCount(QQ::Equal(QQN::QcodoClass()->FileId, $intFileId));
}