本文整理汇总了PHP中QQN::Authorization方法的典型用法代码示例。如果您正苦于以下问题:PHP QQN::Authorization方法的具体用法?PHP QQN::Authorization怎么用?PHP QQN::Authorization使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QQN
的用法示例。
在下文中一共展示了QQN::Authorization方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Form_Create
protected function Form_Create()
{
// Setup DataGrid Columns
$this->colEditLinkColumn = new QDataGridColumn(QApplication::Translate('Edit'), '<?= $_FORM->dtgAuthorization_EditLinkColumn_Render($_ITEM) ?>');
$this->colEditLinkColumn->HtmlEntities = false;
$this->colAuthorizationId = new QDataGridColumn(QApplication::Translate('Authorization Id'), '<?= $_ITEM->AuthorizationId; ?>', array('OrderByClause' => QQ::OrderBy(QQN::Authorization()->AuthorizationId), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Authorization()->AuthorizationId, false)));
$this->colShortDescription = new QDataGridColumn(QApplication::Translate('Short Description'), '<?= QString::Truncate($_ITEM->ShortDescription, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::Authorization()->ShortDescription), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Authorization()->ShortDescription, false)));
// Setup DataGrid
$this->dtgAuthorization = new QDataGrid($this);
$this->dtgAuthorization->CellSpacing = 0;
$this->dtgAuthorization->CellPadding = 4;
$this->dtgAuthorization->BorderStyle = QBorderStyle::Solid;
$this->dtgAuthorization->BorderWidth = 1;
$this->dtgAuthorization->GridLines = QGridLines::Both;
// Datagrid Paginator
$this->dtgAuthorization->Paginator = new QPaginator($this->dtgAuthorization);
$this->dtgAuthorization->ItemsPerPage = 10;
// Specify Whether or Not to Refresh using Ajax
$this->dtgAuthorization->UseAjax = false;
// Specify the local databind method this datagrid will use
$this->dtgAuthorization->SetDataBinder('dtgAuthorization_Bind');
$this->dtgAuthorization->AddColumn($this->colEditLinkColumn);
$this->dtgAuthorization->AddColumn($this->colAuthorizationId);
$this->dtgAuthorization->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->dtgAuthorization_EditLinkColumn_Render($_ITEM) ?>');
$this->colEditLinkColumn->HtmlEntities = false;
$this->colAuthorizationId = new QDataGridColumn(QApplication::Translate('Authorization Id'), '<?= $_ITEM->AuthorizationId; ?>', array('OrderByClause' => QQ::OrderBy(QQN::Authorization()->AuthorizationId), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Authorization()->AuthorizationId, false)));
$this->colShortDescription = new QDataGridColumn(QApplication::Translate('Short Description'), '<?= QString::Truncate($_ITEM->ShortDescription, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::Authorization()->ShortDescription), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Authorization()->ShortDescription, false)));
// Setup DataGrid
$this->dtgAuthorization = new QDataGrid($this);
$this->dtgAuthorization->CellSpacing = 0;
$this->dtgAuthorization->CellPadding = 4;
$this->dtgAuthorization->BorderStyle = QBorderStyle::Solid;
$this->dtgAuthorization->BorderWidth = 1;
$this->dtgAuthorization->GridLines = QGridLines::Both;
// Datagrid Paginator
$this->dtgAuthorization->Paginator = new QPaginator($this->dtgAuthorization);
$this->dtgAuthorization->ItemsPerPage = 10;
// Specify Whether or Not to Refresh using Ajax
$this->dtgAuthorization->UseAjax = true;
// Specify the local databind method this datagrid will use
$this->dtgAuthorization->SetDataBinder('dtgAuthorization_Bind', $this);
$this->dtgAuthorization->AddColumn($this->colEditLinkColumn);
$this->dtgAuthorization->AddColumn($this->colAuthorizationId);
$this->dtgAuthorization->AddColumn($this->colShortDescription);
// Setup the Create New button
$this->btnCreateNew = new QButton($this);
$this->btnCreateNew->Text = QApplication::Translate('Create a New') . ' ' . QApplication::Translate('Authorization');
$this->btnCreateNew->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnCreateNew_Click'));
}
示例3: LoadByAuthorizationId
/**
* Load a single Authorization object,
* by AuthorizationId Index(es)
* @param integer $intAuthorizationId
* @return Authorization
*/
public static function LoadByAuthorizationId($intAuthorizationId)
{
return Authorization::QuerySingle(QQ::Equal(QQN::Authorization()->AuthorizationId, $intAuthorizationId));
}
示例4: ResolveContentItem
/**
* Used internally by the Meta-based Add Column tools.
*
* Given a QQNode or a Text String, this will return a Authorization-based QQNode.
* It will also verify that it is a proper Authorization-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 == 'authorization') {
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 "authorization".');
}
} else {
if (is_string($mixContent)) {
switch ($mixContent) {
case 'AuthorizationId':
return QQN::Authorization()->AuthorizationId;
case 'ShortDescription':
return QQN::Authorization()->ShortDescription;
default:
throw new QCallerException('Simple Property not found in AuthorizationDataGrid 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');
}
}
}
}
示例5: LoadByAuthorizationId
/**
* Load a single Authorization object,
* by AuthorizationId Index(es)
* @param integer $intAuthorizationId
* @return Authorization
*/
public static function LoadByAuthorizationId($intAuthorizationId, $objOptionalClauses = null)
{
return Authorization::QuerySingle(QQ::Equal(QQN::Authorization()->AuthorizationId, $intAuthorizationId), $objOptionalClauses);
}