CommonDataTrait
UI trait for use between admin controllers.
Tags
Table of Contents
Methods
- getConfigDb() : array<string|int, mixed>
- Get config from DB.
- setCssAssets() : mixed
- Set CSS assets for common admin pages.
- setJsAssetsAndObject() : mixed
- Set JS assets and its object for XHR common data.
Methods
getConfigDb()
Get config from DB.
protected
getConfigDb() : array<string|int, mixed>
This will get commonly used between admin controllers with these data.
rdbadmin_SiteName, rdbadmin_SiteTimezone, rdbadmin_AdminItemsPerPage,
Return values
array<string|int, mixed>setCssAssets()
Set CSS assets for common admin pages.
protected
setCssAssets(Assets $Assets, array<string|int, mixed> $assetsData) : mixed
This is required to make basic admin pages working correctly.
Parameters
- $Assets : Assets
-
The Assets class.
- $assetsData : array<string|int, mixed>
-
The assets data. Please read more on
\Rdb\Modules\RdbAdmin\Libraries\Assets::addMultipleAssets()
.
setJsAssetsAndObject()
Set JS assets and its object for XHR common data.
protected
setJsAssetsAndObject(Assets $Assets, array<string|int, mixed> $assetsData) : mixed
This is required to make basic admin pages working correctly.
Parameters
- $Assets : Assets
-
The Assets class.
- $assetsData : array<string|int, mixed>
-
The assets data. Please read more on
\Rdb\Modules\RdbAdmin\Libraries\Assets::addMultipleAssets()
.