本文整理汇总了PHP中Random::GetIntRandom方法的典型用法代码示例。如果您正苦于以下问题:PHP Random::GetIntRandom方法的具体用法?PHP Random::GetIntRandom怎么用?PHP Random::GetIntRandom使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Random
的用法示例。
在下文中一共展示了Random::GetIntRandom方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: RenderGrid
function RenderGrid(Grid $grid)
{
$columnEditors = array();
$dataset = $grid->GetDataset();
if ($grid->GetErrorMessage() != '') {
foreach ($grid->GetViewColumns() as $column) {
$editor = $column->GetInsertOperationEditor();
if (isset($editor)) {
$columnEditors[$column->GetName()]['Html'] = $this->Render($editor, false, true);
$columnEditors[$column->GetName()]['Script'] = $this->Render($editor, true, false);
}
}
$this->DisplayTemplate('inline_operations/grid_edit_error_response.tpl', array('ErrorCaption' => 'ErrorsDuringInsertProcess', 'ErrorMessage' => $grid->GetErrorMessage(), 'ColumnEditors' => $columnEditors), array());
return;
}
$cellClasses = array();
$rowStyleByColumns = $grid->GetRowStylesByColumn($grid->GetDataset()->GetFieldValues(), $cellClasses);
$columns = array();
foreach ($grid->GetViewColumns() as $column) {
$columnName = $dataset->IsLookupField($column->GetName()) ? $dataset->IsLookupFieldNameByDisplayFieldName($column->GetName()) : $column->GetName();
$columns[$column->GetName()]['Value'] = $grid->RenderColumn($this, $column);
$columns[$column->GetName()]['AfterRowControl'] = $this->Render($column->GetAfterRowControl());
$columns[$column->GetName()]['Style'] = $rowStyleByColumns[$columnName];
}
$primaryKeys = array();
if ($grid->GetAllowDeleteSelected()) {
$primaryKeys = $grid->GetDataset()->GetPrimaryKeyValues();
}
$actionsRowViewData = array();
foreach ($grid->getActions()->getOperations() as $operation) {
$operationName = $dataset->IsLookupField($operation->GetName()) ? $dataset->IsLookupFieldNameByDisplayFieldName($operation->GetName()) : $operation->GetName();
$actionsRowViewData[$operationName] = array('OperationName' => $operationName, 'Data' => $operation->GetValue());
}
$detailsViewData = $grid->GetDetailsViewData();
$this->DisplayTemplate('inline_operations/grid_insert_commit_response.tpl', array('encoding' => $grid->GetPage()->GetContentEncoding(), 'AllowDeleteSelected' => $grid->GetAllowDeleteSelected(), 'PrimaryKeys' => $primaryKeys, 'Columns' => $columns, 'Actions' => $actionsRowViewData, 'RecordUID' => Random::GetIntRandom(), 'HasDetails' => $grid->GetHasDetails(), 'Details' => array('Items' => $detailsViewData, 'JSON' => htmlspecialchars(SystemUtils::ToJSON($detailsViewData)))), array());
}
示例2: NextRecordHandler
public function NextRecordHandler($sender)
{
$this->frameRandomNumber = Random::GetIntRandom();
}
示例3: RenderGrid
function RenderGrid(Grid $grid)
{
$columnEditors = array();
$dataset = $grid->GetDataset();
if ($grid->GetErrorMessage() != '') {
foreach ($grid->GetViewColumns() as $column) {
$editor = $column->GetInsertOperationEditor();
if (isset($editor)) {
$columnEditors[$column->GetName()]['Html'] = $this->Render($editor, false, true);
$columnEditors[$column->GetName()]['Script'] = $this->Render($editor, true, false);
}
}
$this->DisplayTemplate('inline_operations/grid_edit_error_response.tpl', array('ErrorMessage' => $grid->GetErrorMessage(), 'ColumnEditors' => $columnEditors), array());
return;
}
$rowStyleByColumns = $grid->GetRowStylesByColumn($grid->GetDataset()->GetFieldValues());
$columns = array();
foreach ($grid->GetViewColumns() as $column) {
$columnName = $dataset->IsLookupField($column->GetName()) ? $dataset->IsLookupFieldNameByDisplayFieldName($column->GetName()) : $column->GetName();
$columns[$column->GetName()]['Value'] = $grid->RenderColumn($this, $column);
$columns[$column->GetName()]['AfterRowControl'] = $this->Render($column->GetAfterRowControl());
$columns[$column->GetName()]['Style'] = $rowStyleByColumns[$columnName];
}
$primaryKeys = array();
if ($grid->GetAllowDeleteSelected()) {
$primaryKeys = $grid->GetDataset()->GetPrimaryKeyValues();
}
$this->DisplayTemplate('inline_operations/grid_insert_commit_response.tpl', array('AllowDeleteSelected' => $grid->GetAllowDeleteSelected(), 'PrimaryKeys' => $primaryKeys, 'Columns' => $columns, 'RecordUID' => Random::GetIntRandom()), array());
}