本文整理匯總了PHP中Grid::ProcessMessages方法的典型用法代碼示例。如果您正苦於以下問題:PHP Grid::ProcessMessages方法的具體用法?PHP Grid::ProcessMessages怎麽用?PHP Grid::ProcessMessages使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Grid
的用法示例。
在下文中一共展示了Grid::ProcessMessages方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Render
public function Render(Renderer $renderer)
{
try {
$errorReporting = error_reporting(null);
GetApplication()->SetOperation(OPERATION_COMMIT_DELETE);
$this->grid->SetState(OPERATION_COMMIT_DELETE);
$this->grid->GetState()->SetUseGetToExtractPrimaryKeys(true);
$this->grid->ProcessMessages();
header('Content-Type: text/xml');
if ($this->grid->GetErrorMessage() != '') {
$xmlWriter = XMLWriterFactory::CreateXMLWriter();
$xmlWriter->StartDocument('1.0', 'UTF-8');
$xmlWriter->StartElement('response');
$xmlWriter->WriteElement('type', 'error');
$xmlWriter->WriteElement('error_message', $this->grid->GetErrorMessage());
$xmlWriter->EndElement('response');
echo $xmlWriter->GetResult();
} else {
$xmlWriter = XMLWriterFactory::CreateXMLWriter();
$xmlWriter->StartDocument('1.0', 'UTF-8');
$xmlWriter->StartElement('response');
$xmlWriter->WriteElement('type', 'OK');
$xmlWriter->EndElement('response');
echo $xmlWriter->GetResult();
}
error_reporting($errorReporting);
} catch (Exception $e) {
echo '<?xml version="1.0" encoding="UTF-8"?><response><type>error</type><error_message>' . htmlspecialchars($e->getMessage()) . '</error_message></response>';
}
}
示例2: DoProcessMessages
function DoProcessMessages()
{
if (GetOperation() != OPERATION_RSS) {
//if (isset($this->AdvancedSearchControl) && $this->OpenAdvancedSearchByDefault())
//if (!$this->AdvancedSearchControl->HasCondition())
// GetApplication()->SetOperation(OPERATION_ADVANCED_SEARCH);
$this->grid->SetState(GetOperation());
$advancedSearchApplied = false;
if (isset($this->AdvancedSearchControl)) {
$advancedSearchApplied = $this->AdvancedSearchControl->ProcessMessages();
}
$this->grid->ProcessMessages();
if (isset($this->pageNavigator)) {
$this->pageNavigator->ProcessMessages();
}
if ($advancedSearchApplied) {
$link = $this->CreateLinkBuilder();
header('Location: ' . $link->GetLink());
exit;
}
}
}
示例3: ProcessMessages
public function ProcessMessages()
{
GetApplication()->SetOperation(OPERATION_VIEW);
$this->grid->SetState(OPERATION_VIEW);
$this->grid->ProcessMessages();
}