当前位置: 首页>>代码示例>>PHP>>正文


PHP QApplication::AuthorizeControl方法代码示例

本文整理汇总了PHP中QApplication::AuthorizeControl方法的典型用法代码示例。如果您正苦于以下问题:PHP QApplication::AuthorizeControl方法的具体用法?PHP QApplication::AuthorizeControl怎么用?PHP QApplication::AuthorizeControl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QApplication的用法示例。


在下文中一共展示了QApplication::AuthorizeControl方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct($objParentObject, $strControlId = null, $intEntityQtypeId = null, $intEntityId = null)
 {
     parent::__construct($objParentObject, $strControlId);
     $this->intAttachmentCount = Attachment::CountByEntityQtypeIdEntityId($intEntityQtypeId, $intEntityId);
     if ($this->intAttachmentCount > 0) {
         $this->strTemplate = __DOCROOT__ . __SUBDIRECTORY__ . '/common/QAttachments.tpl.php';
         $this->lblAttachments_Create();
         $this->pnlAttachments = new QPanel($this);
         $this->pnlAttachments->strTemplate = __DOCROOT__ . __SUBDIRECTORY__ . '/common/attachments.tpl.php';
         $this->pnlAttachments->Display = false;
         $this->objAttachmentArray = Attachment::LoadArrayByEntityQtypeIdEntityId($intEntityQtypeId, $intEntityId);
         $this->arrAttachments = array();
         foreach ($this->objAttachmentArray as $key => $objAttachment) {
             $strAttachment = sprintf('<strong><a href="' . __PHP_ASSETS__ . '/download.php?tmp_filename=%s&attachment_id=%s" target="_blank" style="color:blue;">%s</a></strong> (%s bytes) %s by %s  ', $objAttachment->TmpFilename, $objAttachment->AttachmentId, $objAttachment->Filename, $objAttachment->Size, $objAttachment->CreationDate, $objAttachment->CreatedByObject->__toStringFullName());
             $lblDelete = new QLabel($this->pnlAttachments);
             $lblDelete->Text = 'Delete<br/>';
             $lblDelete->ForeColor = '#555555';
             $lblDelete->FontUnderline = true;
             $lblDelete->SetCustomStyle('cursor', 'pointer');
             $lblDelete->HtmlEntities = false;
             $lblDelete->ActionParameter = $objAttachment->AttachmentId;
             $lblDelete->AddAction(new QClickEvent(), new QConfirmAction('Are you sure you want to delete this attachment?'));
             $lblDelete->AddAction(new QClickEvent(), new QServerControlAction($this, 'lblDelete_Click'));
             QApplication::AuthorizeControl($objAttachment, $lblDelete, 3);
             $this->arrAttachments[$key]['strAttachment'] = $strAttachment;
             $this->arrAttachments[$key]['lblDelete'] = $lblDelete;
         }
     } else {
         $this->Display = false;
     }
 }
开发者ID:proxymoron,项目名称:tracmor,代码行数:31,代码来源:QAttachments.class.php

示例2: lstLocationInventoryReceived_Render

 public function lstLocationInventoryReceived_Render(InventoryTransaction $objInventoryTransaction)
 {
     if (!$objInventoryTransaction->blnReturnReceivedStatus()) {
         $strControlId = 'lstLocationInventoryReceived' . $objInventoryTransaction->InventoryTransactionId;
         $lstLocationInventoryReceived = $this->GetControl($strControlId);
         if (!$lstLocationInventoryReceived) {
             // Create the drop down list for this row in the datagrid
             // Use ActionParameter to specify the Id of the AssetTransaction
             $lstLocationInventoryReceived = new QListBox($this->dtgInventoryTransact, $strControlId);
             $lstLocationInventoryReceived->Name = 'Location To Receive';
             $lstLocationInventoryReceived->ActionParameter = $objInventoryTransaction->InventoryTransactionId;
             $lstLocationInventoryReceived->AddItem('- Select One -', null);
             $objLocationArray = Location::LoadAllLocations(false, false, 'short_description', null, null, false, false, false, true);
             if ($objLocationArray) {
                 foreach ($objLocationArray as $objLocation) {
                     $lstLocationInventoryReceived->AddItem($objLocation->__toString(), $objLocation->LocationId);
                 }
             }
             $lstLocationInventoryReceived->AddAction(new QEnterKeyEvent(), new QAjaxAction('btnReceiveInventoryTransaction'));
             $lstLocationInventoryReceived->AddAction(new QEnterKeyEvent(), new QTerminateAction());
         }
         QApplication::AuthorizeControl($this->objReceipt, $lstLocationInventoryReceived, 2);
         return $lstLocationInventoryReceived->Render(false);
     }
 }
开发者ID:proxymoron,项目名称:tracmor,代码行数:25,代码来源:receipt_edit.php

示例3: atcAttach_Create

 protected function atcAttach_Create()
 {
     $this->atcAttach = new QAttach($this, null, EntityQtype::Address, $this->objAddress->AddressId);
     QApplication::AuthorizeControl($this->objAddress, $this->atcAttach, 2);
 }
开发者ID:proxymoron,项目名称:tracmor,代码行数:5,代码来源:address_edit.php

示例4: btnReceive_Create

 protected function btnReceive_Create()
 {
     $this->btnReceive = new QButton($this);
     $this->btnReceive->Text = 'Receive';
     $this->btnReceive->AddAction(new QClickEvent(), new QServerControlAction($this, 'btnReceive_Click'));
     $this->btnReceive->AddAction(new QEnterKeyEvent(), new QServerControlAction($this, 'btnReceive_Click'));
     $this->btnReceive->AddAction(new QEnterKeyEvent(), new QTerminateAction());
     $this->btnReceive->CausesValidation = false;
     // Asset must be Shipped or To Be Received to display the Receive Button
     if ($this->objAsset->LocationId != 2 && $this->objAsset->LocationId != 5) {
         $this->btnReceive->Display = false;
     }
     QApplication::AuthorizeControl($this->objAsset, $this->btnReceive, 2);
     if ($this->btnReceive->Visible) {
         // Check if they have the ability to create a new shipment
         QApplication::AuthorizeControl(null, $this->btnReceive, 2, 6);
     }
 }
开发者ID:brustj,项目名称:tracmor,代码行数:18,代码来源:QAssetEditComposite.class.php

示例5: btnCreateContact_Create

 protected function btnCreateContact_Create()
 {
     $this->btnCreateContact = new QButton($this);
     $this->btnCreateContact->Text = QApplication::Translate('Create New Contact');
     $this->btnCreateContact->AddAction(new QClickEvent(), new QServerAction('btnCreateContact_Click'));
     $this->btnCreateContact->AddAction(new QEnterKeyEvent(), new QServerAction('btnCreateContact_Click'));
     $this->btnCreateContact->AddAction(new QEnterKeyEvent(), new QTerminateAction());
     $this->btnCreateContact->CausesValidation = false;
     QApplication::AuthorizeControl($this->objCompany, $this->btnCreateContact, 2);
 }
开发者ID:heshuai64,项目名称:einv2,代码行数:10,代码来源:company_edit.php

示例6: atcAttach_Create

 protected function atcAttach_Create()
 {
     $this->atcAttach = new QAttach($this, null, EntityQtype::AssetModel, $this->objAssetModel->AssetModelId);
     QApplication::AuthorizeControl($this->objAssetModel, $this->atcAttach, 2);
 }
开发者ID:brustj,项目名称:tracmor,代码行数:5,代码来源:asset_model_edit.php

示例7: atcAttach_Create

 protected function atcAttach_Create()
 {
     $this->atcAttach = new QAttach($this, null, EntityQtype::Shipment, $this->objShipment->ShipmentId);
     QApplication::AuthorizeControl($this->objShipment, $this->atcAttach, 2);
 }
开发者ID:proxymoron,项目名称:tracmor,代码行数:5,代码来源:shipment_edit.php

示例8: btnReceive_Create

 protected function btnReceive_Create()
 {
     $this->btnReceive = new QButton($this);
     $this->btnReceive->Text = 'Receive';
     $this->btnReceive->AddAction(new QClickEvent(), new QServerControlAction($this, 'btnReceive_Click'));
     $this->btnReceive->AddAction(new QEnterKeyEvent(), new QServerControlAction($this, 'btnReceive_Click'));
     $this->btnReceive->AddAction(new QEnterKeyEvent(), new QTerminateAction());
     $this->btnReceive->CausesValidation = false;
     QApplication::AuthorizeControl($this->objInventoryModel, $this->btnReceive, 2);
 }
开发者ID:heshuai64,项目名称:einv2,代码行数:10,代码来源:QInventoryEditComposite.class.php


注:本文中的QApplication::AuthorizeControl方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。