本文整理汇总了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());
}