ActionIndex
extends VuePageAction
in package
Class ActionIndex
Tags
Table of Contents
- JAVASCRIPT_ENGINE = 'GambioAdmin'
- $textManager : TextManager
- $url : Url
- $configurationService : ConfigurationService
- $curl : Curl
- $htmlProvider : HtmlProvider
- $isLargeLayout : bool
- $permissionService : PermissionService
- $renderer : GambioAdminRenderer
- $setupWizardService : SetupWizardServiceInterface
- $statisticService : DashboardStatisticsService
- $statisticsResultFactory : StatisticsResultFactory
- $storage : DashboardConfigurationStorage
- $translations : FrontendTranslations
- $userPreferences : UserPreferences
- __construct() : mixed
- ActionIndex constructor.
- __invoke() : Response
- This method will be called in order to process the incoming request.
- handle() : Response
- initAbstractAction() : void
- Module action initialization.
- initAdminAction() : void
- Admin action initialization.
- render() : string
- Renders the template.
- replaceRenderer() : void
- Replaces the renderer.
- useFrontendTranslations() : void
- Uses the given frontend translations instance to add new translations.
- addVuePageTranslation() : void
- Adds a new vue page translation.
- enableLargePageLayout() : void
- Enables the large page layout.
- jsEntrypoint() : string
- Returns the name of the js entrypoint.
- translate() : string
- Translates the section phrase.
- getDashboardContent() : string
- getStatisticsResult() : Result
- If the current admin do not have Shop Statistics permission, we return an empty Result object
- userHasShopStatisticsPermission() : bool
- Checks if the user has permission to access the Shop Statistics
Constants
JAVASCRIPT_ENGINE
private
mixed
JAVASCRIPT_ENGINE
= 'GambioAdmin'
Properties
$textManager
protected
TextManager
$textManager
$url
protected
Url
$url
$configurationService
private
ConfigurationService
$configurationService
$curl
private
Curl
$curl
$htmlProvider
private
HtmlProvider
$htmlProvider
$isLargeLayout
private
bool
$isLargeLayout
= false
$permissionService
private
PermissionService
$permissionService
$renderer
private
GambioAdminRenderer
$renderer
$setupWizardService
private
SetupWizardServiceInterface
$setupWizardService
$statisticService
private
DashboardStatisticsService
$statisticService
$statisticsResultFactory
private
StatisticsResultFactory
$statisticsResultFactory
$storage
private
DashboardConfigurationStorage
$storage
$translations
private
FrontendTranslations
$translations
$userPreferences
private
UserPreferences
$userPreferences
Methods
__construct()
ActionIndex constructor.
public
__construct(DashboardStatisticsService $statisticService, SetupWizardServiceInterface $setupWizardService, DashboardConfigurationStorage $storage, HtmlProvider $htmlProvider, Url $url, ConfigurationService $configurationService, PermissionService $permissionService, UserPreferences $userPreferences, StatisticsResultFactory $statisticsResultFactory) : mixed
Parameters
- $statisticService : DashboardStatisticsService
- $setupWizardService : SetupWizardServiceInterface
- $storage : DashboardConfigurationStorage
- $htmlProvider : HtmlProvider
- $url : Url
- $configurationService : ConfigurationService
- $permissionService : PermissionService
- $userPreferences : UserPreferences
- $statisticsResultFactory : StatisticsResultFactory
Return values
mixed —__invoke()
This method will be called in order to process the incoming request.
public
__invoke(Request $request, Response $response) : Response
Parameters
Return values
Response —handle()
public
handle(Request $request, Response $response) : Response
Parameters
Tags
Return values
Response —initAbstractAction()
Module action initialization.
public
initAbstractAction(Url $url, TextManager $textManager) : void
Parameters
- $url : Url
- $textManager : TextManager
Return values
void —initAdminAction()
Admin action initialization.
public
initAdminAction(GambioAdminRenderer $renderer) : void
Parameters
- $renderer : GambioAdminRenderer
Return values
void —render()
Renders the template.
public
render(string $pageTitle, string $templatePath[, array<string|int, mixed> $data = [] ]) : string
Parameters
- $pageTitle : string
- $templatePath : string
- $data : array<string|int, mixed> = []
Tags
Return values
string —replaceRenderer()
Replaces the renderer.
public
replaceRenderer(GambioAdminRenderer $renderer) : void
This method can be inflected on child classes to provide a differently function renderer.
Parameters
- $renderer : GambioAdminRenderer
Return values
void —useFrontendTranslations()
Uses the given frontend translations instance to add new translations.
public
useFrontendTranslations(FrontendTranslations $translations) : void
Parameters
- $translations : FrontendTranslations
Return values
void —addVuePageTranslation()
Adds a new vue page translation.
protected
addVuePageTranslation(string $key, string $phraseOrSection[, string|null $section = null ]) : void
Parameters
- $key : string
- $phraseOrSection : string
- $section : string|null = null
Return values
void —enableLargePageLayout()
Enables the large page layout.
protected
enableLargePageLayout() : void
Technically, this method sets an internal flag, so the layout hides the message stack and content navigation.
Return values
void —jsEntrypoint()
Returns the name of the js entrypoint.
protected
jsEntrypoint() : string
Tags
Return values
string —translate()
Translates the section phrase.
protected
translate(string $phrase, string $section[, int|null $languageId = null ]) : string
Parameters
- $phrase : string
- $section : string
- $languageId : int|null = null
Return values
string —getDashboardContent()
private
getDashboardContent() : string
Tags
Return values
string —getStatisticsResult()
If the current admin do not have Shop Statistics permission, we return an empty Result object
private
getStatisticsResult() : Result
Return values
Result —userHasShopStatisticsPermission()
Checks if the user has permission to access the Shop Statistics
private
userHasShopStatisticsPermission() : bool