本文整理匯總了PHP中ArrayUtils::Merge方法的典型用法代碼示例。如果您正苦於以下問題:PHP ArrayUtils::Merge方法的具體用法?PHP ArrayUtils::Merge怎麽用?PHP ArrayUtils::Merge使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ArrayUtils
的用法示例。
在下文中一共展示了ArrayUtils::Merge方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: ProcessMessages
public function ProcessMessages()
{
$nameSuffix = ExtractInputValue('namesuffix', METHOD_POST);
$columns = $this->grid->GetViewColumns();
foreach ($columns as $column) {
$inlineEditColumn = $column->GetInsertOperationColumn();
if (isset($inlineEditColumn)) {
$editControl = $inlineEditColumn->GetEditControl();
$editControl->SetName($editControl->GetName() . $nameSuffix);
}
}
$this->GetDataset()->Insert();
$exceptions = array();
foreach ($this->GetColumns() as $column) {
try {
$column->ProcessMessages();
} catch (Exception $e) {
$exceptions[] = $e;
}
}
foreach ($this->GetColumns() as $column) {
try {
$column->AfterSetAllDatasetValues();
} catch (Exception $e) {
$exceptions[] = $e;
}
}
$message = '';
$oldFieldValues = $this->GetDataset()->GetCurrentFieldValues();
$fieldValues = $this->GetDataset()->GetCurrentFieldValues();
if ($this->CanChangeData($fieldValues, $message)) {
if (count($exceptions) > 0) {
$this->HandleError($this->ExceptionsToErrorMessage($exceptions), false);
return;
}
try {
$this->WriteChangesToDataset($oldFieldValues, $fieldValues, $this->GetDataset());
$this->GetDataset()->Post();
$fieldValues = ArrayUtils::Merge($fieldValues, $this->GetDataset()->GetInsertFieldValues());
$this->DoAfterChangeData($fieldValues);
$primaryKeyValues = $this->GetDataset()->GetPrimaryKeyValues();
$this->GetDataset()->SetSingleRecordState($primaryKeyValues);
$this->GetDataset()->Open();
$this->GetDataset()->Next();
} catch (Exception $e) {
$this->HandleError($this->ExceptionToErrorMessage($e), false);
return;
}
} else {
$this->HandleError($message, true);
return;
}
$this->grid->SetGridMessage($message);
}
示例2: GetViewData
/**
* @return array
*/
public final function GetViewData()
{
return ArrayUtils::Merge(array('ReadOnly' => $this->GetReadOnly()), $this->DoGetViewData());
}