SilverStripe\Reports\ReportAdmin
Reports section of the CMS.
All reports that should show in the ReportAdmin section
of the CMS need to subclass , and implement
the appropriate methods and variables that are required.
Synopsis
class ReportAdmin
extends LeftAndMain
implements
PermissionProvider
{
- // members
- private static string $url_segment = 'reports';
- private static string $menu_title = 'Reports';
- private static string $menu_icon_class = 'font-icon-chart-line';
- private static $template_path = NULL;
- private static $tree_class = Report::class;
- private static array $url_handlers = ;
- protected $reportClass;
- protected Report $reportObject;
- private static string $required_permission_codes = 'CMS_ACCESS_ReportAdmin';
- // methods
- public void init()
- public boolean canView()
- public SS_List Reports()
- public void handleAction()
- protected string unsanitiseClassName()
- public static boolean has_reports()
- public ArrayList Breadcrumbs()
- public string Link()
- public void providePermissions()
- public void getEditForm()
Hierarchy
Extends
- SilverStripe\Admin\LeftAndMain
Implements
- SilverStripe\Security\PermissionProvider
Members
private
- $required_permission_codes
- $template_path
- $tree_class
- $url_handlers
- $url_segment
protected
- $reportClass
—
string
Variable that describes which report we are currently viewing based on the URL (gets set in init method). - $reportObject — SilverStripe\Reports\Report
Methods
protected
- unsanitiseClassName() — Unsanitise a model class' name from a URL param
public
- Breadcrumbs() — Returns the Breadcrumbs for the ReportAdmin
- Link() — Returns the link to the report admin section, or the specific report that is currently displayed
- Reports() — Return a SS_List of SS_Report subclasses that are available for use.
- canView() — Does the parent permission checks, but also makes sure that instantiatable subclasses of {@link SilverStripe\Reports\Report} exist. By default, the CMS doesn't include any Reports, so there's no point in showing
- getEditForm()
- handleAction()
- has_reports() — Determine if we have reports and need to display the "Reports" main menu item in the CMS.
- init()
- providePermissions()