当前位置: 首页>>代码示例>>PHP>>正文


PHP Grid::GetPage方法代码示例

本文整理汇总了PHP中Grid::GetPage方法的典型用法代码示例。如果您正苦于以下问题:PHP Grid::GetPage方法的具体用法?PHP Grid::GetPage怎么用?PHP Grid::GetPage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Grid的用法示例。


在下文中一共展示了Grid::GetPage方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: RenderGrid

 public function RenderGrid(Grid $grid)
 {
     $hiddenValues = array(OPERATION_PARAMNAME => OPERATION_COMMIT_INSERT);
     $customParams = array();
     $template = $grid->GetPage()->GetCustomTemplate(PagePart::VerticalGrid, PageMode::Insert, 'insert/grid.tpl', $customParams);
     $this->DisplayTemplate($template, array('Grid' => $grid->GetInsertViewData($this)), array_merge($customParams, array('Authentication' => $grid->GetPage()->GetAuthenticationViewData(), 'HiddenValues' => $hiddenValues)));
 }
开发者ID:martinw0102,项目名称:ProjetSyst,代码行数:7,代码来源:insert_renderer.php

示例2: RenderGrid

 function RenderGrid(Grid $grid)
 {
     $hiddenValues = array(OPERATION_PARAMNAME => OPERATION_COMMIT);
     AddPrimaryKeyParametersToArray($hiddenValues, $grid->GetDataset()->GetPrimaryKeyValues());
     $template = $grid->GetPage()->GetCustomTemplate(PagePart::VerticalGrid, PageMode::Edit, 'edit/grid.tpl');
     $this->DisplayTemplate($template, array('Grid' => $grid->GetEditViewData($this)), array('Authentication' => $grid->GetPage()->GetAuthenticationViewData(), 'HiddenValues' => $hiddenValues));
 }
开发者ID:howareyoucolin,项目名称:demo,代码行数:7,代码来源:edit_renderer.php

示例3: RenderGrid

 public function RenderGrid(Grid $Grid)
 {
     $page = $Grid->GetPage();
     // Remove!!!
     if (isset($page->AdvancedSearchControl)) {
         $linkBuilder = $page->CreateLinkBuilder();
         $linkBuilder->AddParameter(OPERATION_PARAMNAME, OPERATION_ADVANCED_SEARCH);
         $page->AdvancedSearchControl->SetOpenInNewWindowLink($linkBuilder->GetLink());
     }
     $template = $this->renderSingleRow ? 'list/single_row.tpl' : 'list/grid.tpl';
     if (!$this->renderSingleRow) {
         $template = $page->GetCustomTemplate(PagePart::Grid, PageMode::ViewAll, $template);
     }
     $this->DisplayTemplate($template, array('Grid' => $Grid, 'Page' => $Grid->GetPage(), 'DataGrid' => $Grid->GetViewData($this)), array('SingleRowTemplate' => $page->GetCustomTemplate(PagePart::GridRow, PageMode::ViewAll, 'list/single_row.tpl'), 'AdvancedSearchControl' => $page->AdvancedSearchControl, 'HiddenValues' => $Grid->GetHiddenValues(), 'TextsForHighlight' => $page->AdvancedSearchControl ? array_map(Q::L('($v) => StringUtils::JSStringLiteral($v)'), $page->AdvancedSearchControl->GetHighlightedFieldText()) : array(), 'HighlightOptions' => $page->AdvancedSearchControl ? $page->AdvancedSearchControl->GetHighlightedFieldOptions() : array(), 'Authentication' => $page->GetAuthenticationViewData(), 'Columns' => $Grid->GetViewColumns(), 'Bands' => $Grid->GetViewBands(), 'FilterBuilder' => $Grid->GetFilterBuilder()->GetViewData(), 'ActiveFilterBuilderJson' => $Grid->GetFilterBuilder()->GetActiveFilterAsJson(), 'ActiveFilterBuilderAsString' => $Grid->GetFilterBuilder()->GetActiveFilterAsString(), 'IsActiveFilterEmpty' => $Grid->GetFilterBuilder()->IsEmpty()));
 }
开发者ID:howareyoucolin,项目名称:demo,代码行数:15,代码来源:list_renderer.php

示例4: __construct

 /**
  * @param Grid     $grid
  * @param Captions $captions
  */
 public function __construct(Grid $grid, Captions $captions)
 {
     $this->captions = $captions;
     $this->superGlobals = GetApplication()->GetSuperGlobals();
     $this->parentGrid = $grid;
     $this->filter = new Filter($grid->GetPage()->GetContentEncoding());
     $this->generator = $this->createSQLGenerator();
     $this->fields = array();
 }
开发者ID:outsourcinggithub,项目名称:outsourcing,代码行数:13,代码来源:filter_builder_control.php

示例5: doRenderGrid

 protected function doRenderGrid(Grid $Grid, $pageMode, $templatePath, $customParams = array())
 {
     $Rows = array();
     while ($Grid->GetDataset()->Next()) {
         $rowValues = $Grid->GetDataset()->GetCurrentFieldValues();
         $Rows[] = Q::ToArray(Q::Select($Grid->GetPrintColumns(), Q::L('$c => $_1->RenderViewColumn($c, $_2)', $this, $rowValues)));
     }
     $template = $Grid->GetPage()->GetCustomTemplate(PagePart::Grid, $pageMode, $templatePath, $customParams);
     $this->DisplayTemplate($template, array('Grid' => $Grid), array_merge($customParams, array('Columns' => $Grid->GetPrintColumns(), 'Rows' => $Rows)));
 }
开发者ID:martinw0102,项目名称:ProjetSyst,代码行数:10,代码来源:print_renderer.php

示例6: SetGrid

 public function SetGrid($value)
 {
     $this->grid = $value;
     $this->caption = $this->grid->GetPage()->RenderText($this->caption);
     if ($this->GetEditOperationColumn() != null) {
         $this->GetEditOperationColumn()->SetGrid($this->grid);
     }
     if ($this->GetInsertOperationColumn() != null) {
         $this->GetInsertOperationColumn()->SetGrid($this->grid);
     }
 }
开发者ID:martinw0102,项目名称:ProjetSyst,代码行数:11,代码来源:columns.php

示例7: RenderGrid

 function RenderGrid(Grid $Grid)
 {
     $Rows = array();
     $Grid->GetDataset()->Open();
     while ($Grid->GetDataset()->Next()) {
         $rowValues = $Grid->GetDataset()->GetCurrentFieldValues();
         $Row = array();
         foreach ($Grid->GetExportColumns() as $column) {
             $Row[$this->PrepareColumnCaptionForXml($column->GetCaption())] = $this->RenderViewColumn($column, $rowValues);
         }
         $Rows[] = $Row;
     }
     $this->DisplayTemplate('export/xml_grid.tpl', array('Grid' => $Grid), array('Rows' => $Rows, 'TableName' => $Grid->GetPage()->GetCaption()));
 }
开发者ID:howareyoucolin,项目名称:demo,代码行数:14,代码来源:xml_renderer.php

示例8: RenderGrid

 function RenderGrid(Grid $Grid)
 {
     $primaryKeyMap = array();
     $Grid->GetDataset()->Open();
     $Row = array();
     $hiddenValues = '';
     if ($Grid->GetDataset()->Next()) {
         foreach ($Grid->GetSingleRecordViewColumns() as $column) {
             $Row[] = $this->Render($column);
         }
         $hiddenValues = array(OPERATION_PARAMNAME => OPERATION_COMMIT_DELETE);
         AddPrimaryKeyParametersToArray($hiddenValues, $Grid->GetDataset()->GetPrimaryKeyValues());
         $primaryKeyMap = $Grid->GetDataset()->GetPrimaryKeyValuesMap();
     }
     $this->DisplayTemplate('delete/grid.tpl', array('Grid' => $Grid, 'Columns' => $Grid->GetSingleRecordViewColumns()), array('Title' => $Grid->GetPage()->GetShortCaption(), 'PrimaryKeyMap' => $primaryKeyMap, 'ColumnCount' => count($Grid->GetSingleRecordViewColumns()), 'Row' => $Row, 'HiddenValues' => $hiddenValues));
 }
开发者ID:martinw0102,项目名称:ProjetSyst,代码行数:16,代码来源:view_renderer.php

示例9: RenderGrid

 public function RenderGrid(Grid $Grid)
 {
     $page = $Grid->GetPage();
     // Remove!!!
     if (isset($page->AdvancedSearchControl)) {
         $linkBuilder = $page->CreateLinkBuilder();
         $linkBuilder->AddParameter(OPERATION_PARAMNAME, OPERATION_ADVANCED_SEARCH);
         $page->AdvancedSearchControl->SetOpenInNewWindowLink($linkBuilder->GetLink());
     }
     $templates = array(ViewMode::TABLE => array('grid' => 'list/grid.tpl', 'single' => 'list/single_row.tpl'), ViewMode::CARD => array('grid' => 'list/grid_card.tpl', 'single' => 'list/single_row_card.tpl'));
     $selectedTemplates = $templates[$Grid->GetViewMode()];
     $template = $this->renderSingleRow ? $selectedTemplates['single'] : $selectedTemplates['grid'];
     $customParams = array();
     if (!$this->renderSingleRow) {
         $template = $page->GetCustomTemplate(PagePart::Grid, PageMode::ViewAll, $template, $customParams);
     }
     $this->DisplayTemplate($template, array('Grid' => $Grid, 'Page' => $Grid->GetPage(), 'DataGrid' => $Grid->GetViewData($this)), array_merge($customParams, array('isMasterGrid' => $Grid->GetName() == 'master_grid', 'SingleRowTemplate' => $page->GetCustomTemplate(PagePart::GridRow, PageMode::ViewAll, $selectedTemplates['single']), 'AdvancedSearchControl' => $page->AdvancedSearchControl, 'HiddenValues' => $Grid->GetHiddenValues(), 'TextsForHighlight' => $page->AdvancedSearchControl ? array_map(Q::L('($v) => StringUtils::JSStringLiteral($v)'), $page->AdvancedSearchControl->GetHighlightedFieldText()) : array(), 'HighlightOptions' => $page->AdvancedSearchControl ? $page->AdvancedSearchControl->GetHighlightedFieldOptions() : array(), 'Authentication' => $page->GetAuthenticationViewData(), 'Columns' => $Grid->GetViewColumns(), 'Bands' => $Grid->GetViewBands(), 'FilterBuilder' => $Grid->GetFilterBuilder()->GetViewData(), 'ActiveFilterBuilderJson' => $Grid->GetFilterBuilder()->GetActiveFilterAsJson(), 'ActiveFilterBuilderAsString' => $Grid->GetFilterBuilder()->GetActiveFilterAsString(), 'IsActiveFilterEmpty' => $Grid->GetFilterBuilder()->IsEmpty(), 'EnableRunTimeCustomization' => $Grid->getEnableRunTimeCustomization(), 'ViewModes' => ViewMode::getList())));
 }
开发者ID:outsourcinggithub,项目名称:outsourcing,代码行数:18,代码来源:list_renderer.php

示例10: RenderGrid

 function RenderGrid(Grid $Grid)
 {
     $Rows = array();
     $Grid->GetDataset()->Open();
     while ($Grid->GetDataset()->Next()) {
         $rowValues = $Grid->GetDataset()->GetCurrentFieldValues();
         $Rows[] = Q::ToArray(Q::Select($Grid->GetPrintColumns(), Q::L('$c => $_1->RenderViewColumn($c, $_2)', $this, $rowValues)));
     }
     $totals = array();
     if ($Grid->HasTotals()) {
         $totalValues = $Grid->GetTotalValues();
         foreach ($Grid->GetPrintColumns() as $column) {
             $totals[] = $column->GetTotalPresentationData(ArrayUtils::GetArrayValueDef($totalValues, $column->GetName(), null));
         }
     }
     $customParams = array();
     $template = $Grid->GetPage()->GetCustomTemplate(PagePart::Grid, PageMode::PrintAll, 'print/grid.tpl', $customParams);
     $this->DisplayTemplate($template, array('Grid' => $Grid), array_merge($customParams, array('Columns' => $Grid->GetPrintColumns(), 'Rows' => $Rows, 'Totals' => $totals)));
 }
开发者ID:kcallow,项目名称:MatchMe,代码行数:19,代码来源:print_renderer.php

示例11: CanChangeData

 protected function CanChangeData(&$rowValues, &$message)
 {
     $cancel = false;
     $this->grid->OnBeforeDataChange->Fire(array($this->grid->GetPage(), &$rowValues, &$cancel, &$message));
     return !$cancel && $this->DoCanChangeData($rowValues, $message);
 }
开发者ID:howareyoucolin,项目名称:demo,代码行数:6,代码来源:grid_state.php

示例12: 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());
 }
开发者ID:outsourcinggithub,项目名称:outsourcing,代码行数:36,代码来源:inline_operation_renderers.php

示例13: SetGrid

 /**
  * @param Grid $value
  * @return void
  */
 public function SetGrid($value)
 {
     $this->grid = $value;
     $this->caption = $this->grid->GetPage()->RenderText($this->caption);
 }
开发者ID:martinw0102,项目名称:ProjetSyst,代码行数:9,代码来源:edit_columns.php

示例14: GetPage

 protected function GetPage()
 {
     return $this->grid->GetPage();
 }
开发者ID:outsourcinggithub,项目名称:outsourcing,代码行数:4,代码来源:grid_state.php


注:本文中的Grid::GetPage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。