NSWDPC\GridHelper\Models\Configuration
Base configuration model for the module.
You can extend and inject your own configuration model as required
- Author: James
Synopsis
class Configuration
{
- // members
- private static integer $max_columns = 12;
- private static string $grid_prefix = "nsw-col";
- private static array $grid_mapping = ;
- private static array $card_columns = ;
- private static bool $sync_grid_to_desktop = true;
- // methods
- public void ColumnMapping()
- public void getGridValue()
Hierarchy
Uses
- SilverStripe\Core\Config\Configurable
- SilverStripe\Core\Extensible
Members
private
- $card_columns
—
array
Available columns to choose from - $grid_mapping — string
- $grid_prefix — string
- $max_columns
—
int
The total number of grid columns in the frontend grid library - $sync_grid_to_desktop — NSWDPC\GridHelper\Models\bool
Methods
public
- ColumnMapping() — Work out and return the grid mapping based on prefix and a key Use the config values to return the relevant values from configuration To have more control over this, you should extend this class method and inject the class using Silverstripe's Injector.
- getGridValue() — Determine grid value based on configuration and desktop value