本文整理汇总了PHP中QQN::VariableGroup方法的典型用法代码示例。如果您正苦于以下问题:PHP QQN::VariableGroup方法的具体用法?PHP QQN::VariableGroup怎么用?PHP QQN::VariableGroup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QQN
的用法示例。
在下文中一共展示了QQN::VariableGroup方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Form_Create
protected function Form_Create()
{
// Setup DataGrid Columns
$this->colEditLinkColumn = new QDataGridColumn(QApplication::Translate('Edit'), '<?= $_FORM->dtgVariableGroup_EditLinkColumn_Render($_ITEM) ?>');
$this->colEditLinkColumn->HtmlEntities = false;
$this->colId = new QDataGridColumn(QApplication::Translate('Id'), '<?= $_ITEM->Id; ?>', array('OrderByClause' => QQ::OrderBy(QQN::VariableGroup()->Id), 'ReverseOrderByClause' => QQ::OrderBy(QQN::VariableGroup()->Id, false)));
$this->colName = new QDataGridColumn(QApplication::Translate('Name'), '<?= QString::Truncate($_ITEM->Name, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::VariableGroup()->Name), 'ReverseOrderByClause' => QQ::OrderBy(QQN::VariableGroup()->Name, false)));
$this->colOrderNumber = new QDataGridColumn(QApplication::Translate('Order Number'), '<?= $_ITEM->OrderNumber; ?>', array('OrderByClause' => QQ::OrderBy(QQN::VariableGroup()->OrderNumber), 'ReverseOrderByClause' => QQ::OrderBy(QQN::VariableGroup()->OrderNumber, false)));
// Setup DataGrid
$this->dtgVariableGroup = new QDataGrid($this);
$this->dtgVariableGroup->CellSpacing = 0;
$this->dtgVariableGroup->CellPadding = 4;
$this->dtgVariableGroup->BorderStyle = QBorderStyle::Solid;
$this->dtgVariableGroup->BorderWidth = 1;
$this->dtgVariableGroup->GridLines = QGridLines::Both;
// Datagrid Paginator
$this->dtgVariableGroup->Paginator = new QPaginator($this->dtgVariableGroup);
$this->dtgVariableGroup->ItemsPerPage = 10;
// Specify Whether or Not to Refresh using Ajax
$this->dtgVariableGroup->UseAjax = false;
// Specify the local databind method this datagrid will use
$this->dtgVariableGroup->SetDataBinder('dtgVariableGroup_Bind');
$this->dtgVariableGroup->AddColumn($this->colEditLinkColumn);
$this->dtgVariableGroup->AddColumn($this->colId);
$this->dtgVariableGroup->AddColumn($this->colName);
$this->dtgVariableGroup->AddColumn($this->colOrderNumber);
}
示例2: Form_Create
protected function Form_Create()
{
if (!QApplication::$Login) {
QApplication::Redirect('/');
}
$this->objVariable = ClassVariable::Load(QApplication::PathInfo(0));
if (!$this->objVariable) {
throw new Exception('Invalid Variable Id: ' . QApplication::PathInfo(0));
}
$this->lblClass = new QLabel($this);
$this->lblClass->Text = $this->objVariable->QcodoClass->Name;
$this->lblName = new QLabel($this);
$this->lblName->Text = $this->objVariable->Variable->Name;
$this->lstVariableGroup = new QListBox($this);
$this->lstVariableGroup->Name = 'Variable Group/Classification';
foreach (VariableGroup::LoadAll(QQ::Clause(QQ::OrderBy(QQN::VariableGroup()->OrderNumber))) as $objVariableGroup) {
$this->lstVariableGroup->AddItem($objVariableGroup->Name, $objVariableGroup->Id, $objVariableGroup->Id == $this->objVariable->VariableGroupId);
}
$this->ctlVariable = new VariableControl($this, $this->objVariable->Variable, true, false);
$this->ctlVariable->Name = 'Variable Information';
$this->btnSave = new QButton($this);
$this->btnSave->Text = 'Save';
$this->btnSave->AddAction(new QClickEvent(), new QServerAction('btnSave_Click'));
$this->btnSave->CausesValidation = true;
$this->btnCancel = new QButton($this);
$this->btnCancel->Text = 'Cancel';
$this->btnCancel->AddAction(new QClickEvent(), new QServerAction('btnCancel_Click'));
$this->btnCancel->CausesValidation = false;
}
示例3: __construct
public function __construct(QcodoClass $objQcodoClass, $objParentControl, $strControlId = null)
{
parent::__construct($objParentControl, $strControlId);
// We're looking at ALL Methods/Operations
$this->objQcodoClass = $objQcodoClass;
$this->strUrl = 'http://' . $_SERVER['HTTP_HOST'] . '/index.php/' . $this->objQcodoClass->Name . '/Variables';
$this->strTemplate = 'VariablePanel.tpl.php';
$objGroupArray = VariableGroup::LoadAll(QQ::Clause(QQ::OrderBy(QQN::VariableGroup()->OrderNumber)));
foreach ($objGroupArray as $objGroup) {
$objVariableArray = $this->objQcodoClass->GetVariablesForVariableGroupId($objGroup->Id);
$this->objVariableGroupArray[$objGroup->Name] = $objVariableArray;
}
}
示例4: Form_Create
protected function Form_Create()
{
if (!QApplication::$Login) {
QApplication::Redirect('/');
}
$this->objProperty = ClassProperty::Load(QApplication::PathInfo(0));
if (!$this->objProperty) {
throw new Exception('Invalid ClassProperty Id: ' . QApplication::PathInfo(0));
}
$this->lblClass = new QLabel($this);
$this->lblClass->Text = $this->objProperty->QcodoClass->Name;
$this->lblName = new QLabel($this);
$this->lblName->Text = $this->objProperty->Variable->Name;
$this->lstVariableGroup = new QListBox($this);
$this->lstVariableGroup->Name = 'Property Group/Classification';
foreach (VariableGroup::LoadAll(QQ::Clause(QQ::OrderBy(QQN::VariableGroup()->OrderNumber))) as $objVariableGroup) {
$this->lstVariableGroup->AddItem($objVariableGroup->Name, $objVariableGroup->Id, $objVariableGroup->Id == $this->objProperty->VariableGroupId);
}
$this->lstClassVariable = new QListBox($this);
$this->lstClassVariable->Name = 'Linked to Member Variable';
$this->lstClassVariable->AddItem('- None -', null);
foreach ($this->objProperty->QcodoClass->GetVariablesForVariableGroupId(null) as $objVariable) {
switch ($objVariable->InheritenceState) {
case InheritenceState::Interited:
$this->lstClassVariable->AddItem($objVariable->Variable->Name . '(inherited)', $objVariable->Id, $this->objProperty->ClassVariableId == $objVariable->Id);
break;
case InheritenceState::Overrides:
$this->lstClassVariable->AddItem($objVariable->Variable->Name . '(overrides)', $objVariable->Id, $this->objProperty->ClassVariableId == $objVariable->Id);
break;
default:
$this->lstClassVariable->AddItem($objVariable->Variable->Name, $objVariable->Id, $this->objProperty->ClassVariableId == $objVariable->Id);
break;
}
}
$this->lstClassVariable->AddAction(new QChangeEvent(), new QAjaxAction('lstClassVariable_Change'));
$this->ctlVariable = new VariableControl($this, $this->objProperty->Variable, true, false);
$this->ctlVariable->Name = 'Property Information';
$this->btnSave = new QButton($this);
$this->btnSave->Text = 'Save';
$this->btnSave->AddAction(new QClickEvent(), new QServerAction('btnSave_Click'));
$this->btnSave->CausesValidation = true;
$this->btnCancel = new QButton($this);
$this->btnCancel->Text = 'Cancel';
$this->btnCancel->AddAction(new QClickEvent(), new QServerAction('btnCancel_Click'));
$this->btnCancel->CausesValidation = false;
$this->lstClassVariable_Change();
}
示例5: __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->dtgVariableGroup_EditLinkColumn_Render($_ITEM) ?>');
$this->colEditLinkColumn->HtmlEntities = false;
$this->colId = new QDataGridColumn(QApplication::Translate('Id'), '<?= $_ITEM->Id; ?>', array('OrderByClause' => QQ::OrderBy(QQN::VariableGroup()->Id), 'ReverseOrderByClause' => QQ::OrderBy(QQN::VariableGroup()->Id, false)));
$this->colName = new QDataGridColumn(QApplication::Translate('Name'), '<?= QString::Truncate($_ITEM->Name, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::VariableGroup()->Name), 'ReverseOrderByClause' => QQ::OrderBy(QQN::VariableGroup()->Name, false)));
$this->colOrderNumber = new QDataGridColumn(QApplication::Translate('Order Number'), '<?= $_ITEM->OrderNumber; ?>', array('OrderByClause' => QQ::OrderBy(QQN::VariableGroup()->OrderNumber), 'ReverseOrderByClause' => QQ::OrderBy(QQN::VariableGroup()->OrderNumber, false)));
// Setup DataGrid
$this->dtgVariableGroup = new QDataGrid($this);
$this->dtgVariableGroup->CellSpacing = 0;
$this->dtgVariableGroup->CellPadding = 4;
$this->dtgVariableGroup->BorderStyle = QBorderStyle::Solid;
$this->dtgVariableGroup->BorderWidth = 1;
$this->dtgVariableGroup->GridLines = QGridLines::Both;
// Datagrid Paginator
$this->dtgVariableGroup->Paginator = new QPaginator($this->dtgVariableGroup);
$this->dtgVariableGroup->ItemsPerPage = 10;
// Specify Whether or Not to Refresh using Ajax
$this->dtgVariableGroup->UseAjax = true;
// Specify the local databind method this datagrid will use
$this->dtgVariableGroup->SetDataBinder('dtgVariableGroup_Bind', $this);
$this->dtgVariableGroup->AddColumn($this->colEditLinkColumn);
$this->dtgVariableGroup->AddColumn($this->colId);
$this->dtgVariableGroup->AddColumn($this->colName);
$this->dtgVariableGroup->AddColumn($this->colOrderNumber);
// Setup the Create New button
$this->btnCreateNew = new QButton($this);
$this->btnCreateNew->Text = QApplication::Translate('Create a New') . ' ' . QApplication::Translate('VariableGroup');
$this->btnCreateNew->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnCreateNew_Click'));
}
示例6: LoadById
/**
* Load a single VariableGroup object,
* by Id Index(es)
* @param integer $intId
* @return VariableGroup
*/
public static function LoadById($intId)
{
return VariableGroup::QuerySingle(QQ::Equal(QQN::VariableGroup()->Id, $intId));
}