本文整理汇总了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);
}
示例2: SetupReceipt
protected function SetupReceipt()
{
parent::SetupReceipt();
QApplication::AuthorizeEntity($this->objReceipt, $this->blnEditMode);
}
示例3: SetupAddress
protected function SetupAddress()
{
parent::SetupAddress();
QApplication::AuthorizeEntity($this->objAddress, $this->blnEditMode);
}
示例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);
}
示例5: SetupCompany
protected function SetupCompany()
{
parent::SetupCompany();
QApplication::AuthorizeEntity($this->objCompany, $this->blnEditMode);
}
示例6: SetupAssetModel
protected function SetupAssetModel()
{
parent::SetupAssetModel();
QApplication::AuthorizeEntity($this->objAssetModel, $this->blnEditMode);
}
示例7: SetupShipment
protected function SetupShipment()
{
parent::SetupShipment();
QApplication::AuthorizeEntity($this->objShipment, $this->blnEditMode);
}