當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。