Skip to content

Commit

Permalink
Add readme section of accessing data
Browse files Browse the repository at this point in the history
  • Loading branch information
daun committed Jan 3, 2020
1 parent 9aeea10 commit 35e9299
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,15 @@ Every panel module **must** implement the `getContent()` method that returns the

Module assets will be included automatically as long as they're named accordingly (`DashboardPanelHelloWorld.css` and `DashboardPanelHelloWorld.js` respectively).

### Accessing Config & Data

Every module derived from the DashboardPanel base class has a few properties populated automatically:

- `$this->options`: Global panel options like title, icon, etc (array)
- `$this->data`: Panel-specific configuration (array)
- `$this->size`: Panel size (string, sanitized to one of allowed values)
- `$this->layout`: Layout options of this panel instance (array)

### Helpers

The panel base class has a few helpers for common tasks.
Expand Down

0 comments on commit 35e9299

Please sign in to comment.