DashboardRepository
class \
Internal
Table of Contents
Properties
- $allowedFields : string[]
- $connectionPool : ConnectionPool
- $container : ContainerInterface
- $widgetRegistry : WidgetRegistry
- $widgets : WidgetInterface[]
Methods
- __construct() : mixed
- create() : Dashboard|null
- delete() : void
- getDashboardByIdentifier() : Dashboard|null
- getDashboardsForUser() : Dashboard[]
- updateDashboardSettings() : int|null
- updateWidgetConfig() : void
- checkAllowedFields() : array
- createFromRow() : Dashboard
- getQueryBuilder() : QueryBuilder
Properties
$allowedFields
protected
string[]
$allowedFields
= ['title']
$connectionPool read-only
protected
ConnectionPool
$connectionPool
$container read-only
protected
ContainerInterface
$container
$widgetRegistry read-only
protected
WidgetRegistry
$widgetRegistry
$widgets
protected
WidgetInterface[]
$widgets
= []
Methods
__construct()
public
__construct(ConnectionPool $connectionPool, WidgetRegistry $widgetRegistry, ContainerInterface $container) : mixed
Parameters
- $connectionPool : ConnectionPool
- $widgetRegistry : WidgetRegistry
- $container : ContainerInterface
create()
public
create(DashboardPreset $dashboardPreset, int $userId[, string $title = '' ]) : Dashboard|null
Parameters
- $dashboardPreset : DashboardPreset
- $userId : int
- $title : string = ''
Return values
Dashboard|nulldelete()
public
delete(Dashboard $dashboard) : void
Parameters
- $dashboard : Dashboard
getDashboardByIdentifier()
public
getDashboardByIdentifier(string $identifier) : Dashboard|null
Parameters
- $identifier : string
Return values
Dashboard|nullgetDashboardsForUser()
public
getDashboardsForUser(int $userId) : Dashboard[]
Parameters
- $userId : int
Return values
Dashboard[]updateDashboardSettings()
public
updateDashboardSettings(string $identifier, array $values) : int|null
Parameters
- $identifier : string
- $values : array
Return values
int|nullupdateWidgetConfig()
public
updateWidgetConfig(Dashboard $dashboard, array<string, mixed>[] $widgets) : void
Parameters
- $dashboard : Dashboard
- $widgets : array<string, mixed>[]
checkAllowedFields()
protected
checkAllowedFields(array $values) : array
Parameters
- $values : array
Return values
arraycreateFromRow()
protected
createFromRow(array $row) : Dashboard
Parameters
- $row : array
Return values
DashboardgetQueryBuilder()
protected
getQueryBuilder() : QueryBuilder