本文整理汇总了PHP中QQN::Module方法的典型用法代码示例。如果您正苦于以下问题:PHP QQN::Module方法的具体用法?PHP QQN::Module怎么用?PHP QQN::Module使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QQN
的用法示例。
在下文中一共展示了QQN::Module方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Form_Create
protected function Form_Create()
{
// Setup DataGrid Columns
$this->colEditLinkColumn = new QDataGridColumn(QApplication::Translate('Edit'), '<?= $_FORM->dtgModule_EditLinkColumn_Render($_ITEM) ?>');
$this->colEditLinkColumn->HtmlEntities = false;
$this->colModuleId = new QDataGridColumn(QApplication::Translate('Module Id'), '<?= $_ITEM->ModuleId; ?>', array('OrderByClause' => QQ::OrderBy(QQN::Module()->ModuleId), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Module()->ModuleId, false)));
$this->colShortDescription = new QDataGridColumn(QApplication::Translate('Short Description'), '<?= QString::Truncate($_ITEM->ShortDescription, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::Module()->ShortDescription), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Module()->ShortDescription, false)));
// Setup DataGrid
$this->dtgModule = new QDataGrid($this);
$this->dtgModule->CellSpacing = 0;
$this->dtgModule->CellPadding = 4;
$this->dtgModule->BorderStyle = QBorderStyle::Solid;
$this->dtgModule->BorderWidth = 1;
$this->dtgModule->GridLines = QGridLines::Both;
// Datagrid Paginator
$this->dtgModule->Paginator = new QPaginator($this->dtgModule);
$this->dtgModule->ItemsPerPage = 10;
// Specify Whether or Not to Refresh using Ajax
$this->dtgModule->UseAjax = false;
// Specify the local databind method this datagrid will use
$this->dtgModule->SetDataBinder('dtgModule_Bind');
$this->dtgModule->AddColumn($this->colEditLinkColumn);
$this->dtgModule->AddColumn($this->colModuleId);
$this->dtgModule->AddColumn($this->colShortDescription);
}
示例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->dtgModule_EditLinkColumn_Render($_ITEM) ?>');
$this->colEditLinkColumn->HtmlEntities = false;
$this->colModuleId = new QDataGridColumn(QApplication::Translate('Module Id'), '<?= $_ITEM->ModuleId; ?>', array('OrderByClause' => QQ::OrderBy(QQN::Module()->ModuleId), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Module()->ModuleId, false)));
$this->colShortDescription = new QDataGridColumn(QApplication::Translate('Short Description'), '<?= QString::Truncate($_ITEM->ShortDescription, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::Module()->ShortDescription), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Module()->ShortDescription, false)));
// Setup DataGrid
$this->dtgModule = new QDataGrid($this);
$this->dtgModule->CellSpacing = 0;
$this->dtgModule->CellPadding = 4;
$this->dtgModule->BorderStyle = QBorderStyle::Solid;
$this->dtgModule->BorderWidth = 1;
$this->dtgModule->GridLines = QGridLines::Both;
// Datagrid Paginator
$this->dtgModule->Paginator = new QPaginator($this->dtgModule);
$this->dtgModule->ItemsPerPage = 10;
// Specify Whether or Not to Refresh using Ajax
$this->dtgModule->UseAjax = true;
// Specify the local databind method this datagrid will use
$this->dtgModule->SetDataBinder('dtgModule_Bind', $this);
$this->dtgModule->AddColumn($this->colEditLinkColumn);
$this->dtgModule->AddColumn($this->colModuleId);
$this->dtgModule->AddColumn($this->colShortDescription);
// Setup the Create New button
$this->btnCreateNew = new QButton($this);
$this->btnCreateNew->Text = QApplication::Translate('Create a New') . ' ' . QApplication::Translate('Module');
$this->btnCreateNew->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnCreateNew_Click'));
}
示例3: ResolveContentItem
/**
* Used internally by the Meta-based Add Column tools.
*
* Given a QQNode or a Text String, this will return a Module-based QQNode.
* It will also verify that it is a proper Module-based QQNode, and will throw an exception otherwise.
*
* @param mixed $mixContent
* @return QQNode
*/
protected function ResolveContentItem($mixContent)
{
if ($mixContent instanceof QQNode) {
if (!$mixContent->_ParentNode) {
throw new QCallerException('Content QQNode cannot be a Top Level Node');
}
if ($mixContent->_RootTableName == 'module') {
if ($mixContent instanceof QQReverseReferenceNode && !$mixContent->_PropertyName) {
throw new QCallerException('Content QQNode cannot go through any "To Many" association nodes.');
}
$objCurrentNode = $mixContent;
while ($objCurrentNode = $objCurrentNode->_ParentNode) {
if (!$objCurrentNode instanceof QQNode) {
throw new QCallerException('Content QQNode cannot go through any "To Many" association nodes.');
}
if ($objCurrentNode instanceof QQReverseReferenceNode && !$objCurrentNode->_PropertyName) {
throw new QCallerException('Content QQNode cannot go through any "To Many" association nodes.');
}
}
return $mixContent;
} else {
throw new QCallerException('Content QQNode has a root table of "' . $mixContent->_RootTableName . '". Must be a root of "module".');
}
} else {
if (is_string($mixContent)) {
switch ($mixContent) {
case 'ModuleId':
return QQN::Module()->ModuleId;
case 'ShortDescription':
return QQN::Module()->ShortDescription;
default:
throw new QCallerException('Simple Property not found in ModuleDataGrid content: ' . $mixContent);
}
} else {
if ($mixContent instanceof QQAssociationNode) {
throw new QCallerException('Content QQNode cannot go through any "To Many" association nodes.');
} else {
throw new QCallerException('Invalid Content type');
}
}
}
}
示例4: LoadAllButHome
/**
* This returns all Module objects except for the Home module
* It is intended to use for the role_edit page because the home module always grants full authorization
*
* @return Array Module Objects
*/
public static function LoadAllButHome()
{
$objModuleArray = Module::QueryArray(QQ::NotEqual(QQN::Module()->ModuleId, 1));
return $objModuleArray;
}
示例5: LoadByModuleId
/**
* Load a single Module object,
* by ModuleId Index(es)
* @param integer $intModuleId
* @return Module
*/
public static function LoadByModuleId($intModuleId, $objOptionalClauses = null)
{
return Module::QuerySingle(QQ::Equal(QQN::Module()->ModuleId, $intModuleId), $objOptionalClauses);
}
示例6: LoadByModuleId
/**
* Load a single Module object,
* by ModuleId Index(es)
* @param integer $intModuleId
* @return Module
*/
public static function LoadByModuleId($intModuleId)
{
return Module::QuerySingle(QQ::Equal(QQN::Module()->ModuleId, $intModuleId));
}