SilverStripe\VersionedAdmin\ArchiveAdmin
Archive admin is a section of the CMS that displays archived records from versioned objects and allows for users to restore them.
Shows tabs for any implementors of and
display any other versioned objects in a dropdown
Synopsis
class ArchiveAdmin
extends ModelAdmin
{
- // members
- private static string $url_segment = 'archive';
- private static string $menu_title = 'Archive';
- private static string $menu_icon_class = 'font-icon-box';
- public boolean $showSearchForm = false;
- // methods
- protected void init()
- public Form getEditForm()
- public static GridField createArchiveGridField()
- public array getVersionedModels()
- public DropdownField getOtherModelSelectorField()
- public ArrayList Breadcrumbs()
- public array getManagedModels()
- public ArrayList getManagedModelTabs()
Hierarchy
Extends
- SilverStripe\Admin\ModelAdmin
Members
private
- $url_segment
public
- $showSearchForm
Methods
protected
public
- Breadcrumbs() — Use 'Archive' as the top title rather than the model title
- createArchiveGridField() — Create a gridfield which displays archived objects
- getEditForm() — Produces an edit form with relevant prioritised tabs for Pages, Blocks and Files
- getManagedModelTabs() — Add the special 'Others' tab
- getManagedModels() — Archive admin needs some extra logic for whether an archive tab should be shown
- getOtherModelSelectorField() — Creates a dropdown field that displays other archived models
- getVersionedModels() — Returns versioned objects, can be filtered for 'main' (has a tab) or 'other' and is exposed through the 'Others' tab, returns all by default