Dashboard

class Dashboard

The main dashboard class. All methods in this function are static methods. So you need to call it like

Dashboard::addComponent($component);

You need to call Dashboard::Render(); after your dashboard script to render the dashboard.

addComponent($component)

Add a component to the dashboard.

Parameters:
  • $component (Component) – The component to add to the dashboard
setTitle($title)

Set the title of the dashboard.

Parameters:
  • $title (string) – The Title of the Dashboard
setFooterText($footer)

Set the footer text of the dashboard.

Parameters:
  • $footer (string) – The footer text of the dashboard.
setDefaults($optionClassName, $options)

Set the default values for a particular options class

Parameters:
  • $optionClassName (string) – Name of the class to set the options for
  • $options (array) – Key-value array of default values
setWidth($width)

Set the width of the dashboard.

By default, the width of the dashboard is automatically determined but you can set it to a specific pixel width for the dashboard.

Note - this will only affect the dashboard in desktop mode, and not in mobile mode

Parameters:
  • $width (int) – The width of the dashboard.
Render()

Main execution function for RazorFlow PHP.

This method displays the dashboard on the browser.

Start building interactive, mobile-friendly Dashboards in PHP. See DemosDownload