class BackendWidgetsPluginExtension extends Twig_Extension

Class BackendWidgetsPluginExtension is injected as app.empire_dashboard_layout service. BackendWidgetsPluginExtension handles the logic and provides necessary data for managed entity in twig.

Constants

DASHBOARD_LAYOUT

Key for caching layouts

Properties

protected BackendWidgetsManager $widgetManager
protected DashboardLayoutCacheDecorator $cacheDecorator

Methods

__construct(BackendWidgetsManager $widgetManager, DashboardLayoutCacheDecorator $cacheDecorator)

BackendWidgetsPluginExtension constructor.

getFunctions()

{@inheritdoc}

mixed|Widget
getDashboardForUser(int $id)

Find cached widgets for user or query and set to cache

string
getName()

Returns the name of the extension.

Details

at line 39
__construct(BackendWidgetsManager $widgetManager, DashboardLayoutCacheDecorator $cacheDecorator)

BackendWidgetsPluginExtension constructor.

Parameters

BackendWidgetsManager $widgetManager
DashboardLayoutCacheDecorator $cacheDecorator

at line 48
getFunctions()

{@inheritdoc}

at line 64
mixed|Widget getDashboardForUser(int $id)

Find cached widgets for user or query and set to cache

Parameters

int $id

Return Value

mixed|Widget

Exceptions

NonUniqueResultException

at line 82
string getName()

Returns the name of the extension.

Return Value

string The extension name