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


PHP QApplication::AuthorizeEntity方法代码示例

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


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

示例1: SetupAsset

 public function SetupAsset($objCaller = null)
 {
     // Lookup Object PK information from Query String (if applicable)
     // Set mode to Edit or New depending on what's found
     // Overridden from AssetEditFormBase to add the $objCaller parameter
     $intAssetId = QApplication::QueryString('intAssetId');
     if ($intAssetId) {
         //$objCaller->objAsset = Asset::Load($intAssetId);
         // To minimize the count of queries
         $objClauses = array();
         array_push($objClauses, QQ::Expand(QQN::Asset()->AssetModel));
         array_push($objClauses, QQ::Expand(QQN::Asset()->AssetModel->Category));
         array_push($objClauses, QQ::Expand(QQN::Asset()->AssetModel->Manufacturer));
         array_push($objClauses, QQ::Expand(QQN::Asset()->ParentAsset));
         array_push($objClauses, QQ::Expand(QQN::Asset()->Location));
         array_push($objClauses, QQ::Expand(QQN::Asset()->CreatedByObject));
         $objCaller->objAsset = Asset::QuerySingle(QQ::Equal(QQN::Asset()->AssetId, $intAssetId), $objClauses);
         if (!$objCaller->objAsset) {
             throw new Exception('Could not find a Asset object with PK arguments: ' . $intAssetId);
         }
         $objCaller->strTitleVerb = QApplication::Translate('Edit');
         $objCaller->blnEditMode = true;
         $this->blnEditChild = true;
     } else {
         $objCaller->objAsset = new Asset();
         $objCaller->strTitleVerb = QApplication::Translate('Create');
         $objCaller->blnEditMode = false;
     }
     QApplication::AuthorizeEntity($objCaller->objAsset, $objCaller->blnEditMode);
 }
开发者ID:proxymoron,项目名称:tracmor,代码行数:30,代码来源:asset_edit.php

示例2: SetupReceipt

 protected function SetupReceipt()
 {
     parent::SetupReceipt();
     QApplication::AuthorizeEntity($this->objReceipt, $this->blnEditMode);
 }
开发者ID:proxymoron,项目名称:tracmor,代码行数:5,代码来源:receipt_edit.php

示例3: SetupAddress

 protected function SetupAddress()
 {
     parent::SetupAddress();
     QApplication::AuthorizeEntity($this->objAddress, $this->blnEditMode);
 }
开发者ID:proxymoron,项目名称:tracmor,代码行数:5,代码来源:address_edit.php

示例4: SetupAsset

 public function SetupAsset($objCaller = null)
 {
     // Lookup Object PK information from Query String (if applicable)
     // Set mode to Edit or New depending on what's found
     // Overridden from AssetEditFormBase to add the $objCaller parameter
     $intAssetId = QApplication::QueryString('intAssetId');
     if ($intAssetId) {
         $objCaller->objAsset = Asset::Load($intAssetId);
         if (!$objCaller->objAsset) {
             throw new Exception('Could not find a Asset object with PK arguments: ' . $intAssetId);
         }
         $objCaller->strTitleVerb = QApplication::Translate('Edit');
         $objCaller->blnEditMode = true;
     } else {
         $objCaller->objAsset = new Asset();
         $objCaller->strTitleVerb = QApplication::Translate('Create');
         $objCaller->blnEditMode = false;
     }
     QApplication::AuthorizeEntity($objCaller->objAsset, $objCaller->blnEditMode);
 }
开发者ID:heshuai64,项目名称:einv2,代码行数:20,代码来源:asset_edit.php

示例5: SetupCompany

 protected function SetupCompany()
 {
     parent::SetupCompany();
     QApplication::AuthorizeEntity($this->objCompany, $this->blnEditMode);
 }
开发者ID:heshuai64,项目名称:einv2,代码行数:5,代码来源:company_edit.php

示例6: SetupAssetModel

 protected function SetupAssetModel()
 {
     parent::SetupAssetModel();
     QApplication::AuthorizeEntity($this->objAssetModel, $this->blnEditMode);
 }
开发者ID:brustj,项目名称:tracmor,代码行数:5,代码来源:asset_model_edit.php

示例7: SetupShipment

 protected function SetupShipment()
 {
     parent::SetupShipment();
     QApplication::AuthorizeEntity($this->objShipment, $this->blnEditMode);
 }
开发者ID:proxymoron,项目名称:tracmor,代码行数:5,代码来源:shipment_edit.php


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