Function RevisionEngineDatabase->ui_revisions_browser

Definitions

sources/revisions_engine_database.php

  • Show a revisions browsing UI for particular resource types.Intended as a simple front-end browsing UI. Full details are in action-log, and restoration details are via ui_revisions_controller.Does not check permissions, assumes only low-privilege data is revealed.More details are shown in the actionlog, which is linked from here.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: object

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$title ?Tempcode No No required parameter N/A N/A Screen title (null: default)
$_header_row array No No required parameter N/A N/A List of field titles (i.e. columns).
$resource_types ?array No No required parameter N/A N/A List of resource types (null: no filter)
$row_renderer mixed No No required parameter N/A N/A Callback for rendering out rows
$resource_id ?string No No Null N/A N/A Resource ID (null: no filter)
$category_id ?string No No Null N/A N/A Category ID (null: no filter)
$member_id ?MEMBER No No Null N/A N/A Member ID (null: no filter)
$category_permission_type ?string No No Null N/A N/A Category permission type (null: no checks)
$include_filter_form boolean No No False N/A N/A Include a form for filtering revisions

Returns

  • Revision UI
  • Type: Tempcode
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Show a revisions browsing UI for particular resource types.Intended as a simple front-end browsing UI. Full details are in action-log, and restoration details are via ui_revisions_controller.Does not check permissions, assumes only low-privilege data is revealed.More details are shown in the actionlog, which is linked from here.
 *
 * @param  ?Tempcode $title Screen title (null: default)
 * @param  array $_header_row List of field titles (i.e. columns).
 * @param  ?array $resource_types List of resource types (null: no filter)
 * @param  mixed $row_renderer Callback for rendering out rows
 * @param  ?string $resource_id Resource ID (null: no filter)
 * @param  ?string $category_id Category ID (null: no filter)
 * @param  ?MEMBER $member_id Member ID (null: no filter)
 * @param  ?string $category_permission_type Category permission type (null: no checks)
 * @param  boolean $include_filter_form Include a form for filtering revisions
 * @return Tempcode Revision UI
 */

public function ui_revisions_browser(?object $title, array $_header_row, ?array $resource_types, $row_renderer, ?string $resource_id = null, ?string $category_id = null, ?int $member_id = null, ?string $category_permission_type = null, bool $include_filter_form = false) : object