IndexAction
extends VuePageAction
in package
Class VuePageAction
Table of Contents
- JAVASCRIPT_ENGINE = 'GambioAdmin'
- TRANSLATION_SECTION = 'options'
- TRANSLATIONS = ['add_option', 'create_option', 'create_option_description', 'cancel', 'create', 'create_attach', 'attach_save', 'add_existing_option', 'add_existing_value', 'delete', 'close', 'save', 'fill_all_fields', 'label', 'label_description', 'description', 'description_description', 'edit_option_heading', 'sort_option_heading', 'add_option_heading', 'add_option_admin_label', 'add_option_admin_label_description', 'add_option_type', 'add_option_type_description', 'add_option_type_option_dropdown', 'add_option_type_option_image', 'add_option_type_option_radio', 'add_option_type_option_text', 'add_option_type_option_boxed_text', 'add_option_type_preview', 'confirm_modal_heading', 'confirm_modal_body', 'edit_value_heading', 'values_table_row_actions', 'values_table_col_value', 'values_table_col_filename', 'values_table_col_model', 'values_table_col_price', 'values_table_col_gross_price', 'values_table_col_net_price', 'values_table_col_weight', 'values_table_col_stock', 'values_table_col_max_count', 'values_table_col_max_days', 'values_table_no_values_added', 'values_table_no_file_selected_label', 'values_table_add_value', 'value_modal_add_heading', 'value_modal_edit_heading', 'value_modal_sort_heading', 'value_modal_label', 'value_modal_label_description', 'value_modal_description', 'value_modal_description_description', 'value_modal_file', 'value_modal_image', 'value_modal_image_description', 'value_modal_image_select', 'value_modal_image_no_file_selected', 'value_modal_image_selected', 'value_modal_model_number', 'value_modal_model_number_description', 'value_modal_weight', 'value_modal_weight_description', 'value_modal_gross_price', 'value_modal_net_price', 'value_modal_price_description', 'value_modal_stock', 'value_modal_stock_description', 'value_modal_stock_max_count', 'value_modal_stock_max_count_description', 'value_modal_stock_max_days', 'value_modal_stock_max_days_group_text', 'value_modal_stock_max_days_description', 'file_manager_modal_title', 'attach_options_modal_title', 'attach_options_modal_label', 'attach_options_modal_description', 'attach_options_modal_available_product_options', 'attach_options_modal_selected_options', 'attach_options_modal_search_options', 'attach_options_modal_search_not_found', 'attach_options_modal_no_available_options', 'attach_options_modal_attached_product_options', 'attach_options_modal_attached_product_options_number', 'attach_options_modal_attached_no_options', 'attach_options_modal_attached_no_options_tip', 'attach_option_values_modal_title_add', 'attach_option_values_modal_title_attach', 'attach_option_values_label', 'attach_option_values_description', 'attach_option_values_available_option_values', 'attach_option_values_selected_values', 'attach_option_values_search_values', 'attach_option_values_search_not_found', 'attach_option_values_attached_option_values', 'attach_option_values_attached_option_values_number', 'attach_option_values_attached_no_values', 'attach_option_values_attached_no_values_tip', 'create_download_description', 'attach_downloads_description', 'attach_downloads_button', 'attach_downloads_modal_title', 'attach_downloads_modal_label', 'attach_downloads_modal_description', 'attach_options_modal_available_download_options', 'attach_options_modal_attached_download_options', 'attach_options_modal_attached_download_options_number', 'success_heading', 'success_message', 'edit_option_value_modal_title', 'edit_download_value_modal_title', 'edit_image', 'add_image', 'edit_image_collection', 'add_image_collection', 'new_collection', 'select_collection', 'collection_name', 'add_images', 'main_image']
- $textManager : TextManager
- $url : Url
- $configurationFinder : ConfigurationFinder
- $connection : Connection
- $isLargeLayout : bool
- $languageService : LanguageService
- $renderer : GambioAdminRenderer
- $translations : FrontendTranslations
- $userPreferences : UserPreferences
- __construct() : mixed
- __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.
- getProductNameById() : string
- getProductSpecialId() : int|null
Constants
JAVASCRIPT_ENGINE
private
mixed
JAVASCRIPT_ENGINE
= 'GambioAdmin'
TRANSLATION_SECTION
private
mixed
TRANSLATION_SECTION
= 'options'
TRANSLATIONS
private
mixed
TRANSLATIONS
= ['add_option', 'create_option', 'create_option_description', 'cancel', 'create', 'create_attach', 'attach_save', 'add_existing_option', 'add_existing_value', 'delete', 'close', 'save', 'fill_all_fields', 'label', 'label_description', 'description', 'description_description', 'edit_option_heading', 'sort_option_heading', 'add_option_heading', 'add_option_admin_label', 'add_option_admin_label_description', 'add_option_type', 'add_option_type_description', 'add_option_type_option_dropdown', 'add_option_type_option_image', 'add_option_type_option_radio', 'add_option_type_option_text', 'add_option_type_option_boxed_text', 'add_option_type_preview', 'confirm_modal_heading', 'confirm_modal_body', 'edit_value_heading', 'values_table_row_actions', 'values_table_col_value', 'values_table_col_filename', 'values_table_col_model', 'values_table_col_price', 'values_table_col_gross_price', 'values_table_col_net_price', 'values_table_col_weight', 'values_table_col_stock', 'values_table_col_max_count', 'values_table_col_max_days', 'values_table_no_values_added', 'values_table_no_file_selected_label', 'values_table_add_value', 'value_modal_add_heading', 'value_modal_edit_heading', 'value_modal_sort_heading', 'value_modal_label', 'value_modal_label_description', 'value_modal_description', 'value_modal_description_description', 'value_modal_file', 'value_modal_image', 'value_modal_image_description', 'value_modal_image_select', 'value_modal_image_no_file_selected', 'value_modal_image_selected', 'value_modal_model_number', 'value_modal_model_number_description', 'value_modal_weight', 'value_modal_weight_description', 'value_modal_gross_price', 'value_modal_net_price', 'value_modal_price_description', 'value_modal_stock', 'value_modal_stock_description', 'value_modal_stock_max_count', 'value_modal_stock_max_count_description', 'value_modal_stock_max_days', 'value_modal_stock_max_days_group_text', 'value_modal_stock_max_days_description', 'file_manager_modal_title', 'attach_options_modal_title', 'attach_options_modal_label', 'attach_options_modal_description', 'attach_options_modal_available_product_options', 'attach_options_modal_selected_options', 'attach_options_modal_search_options', 'attach_options_modal_search_not_found', 'attach_options_modal_no_available_options', 'attach_options_modal_attached_product_options', 'attach_options_modal_attached_product_options_number', 'attach_options_modal_attached_no_options', 'attach_options_modal_attached_no_options_tip', 'attach_option_values_modal_title_add', 'attach_option_values_modal_title_attach', 'attach_option_values_label', 'attach_option_values_description', 'attach_option_values_available_option_values', 'attach_option_values_selected_values', 'attach_option_values_search_values', 'attach_option_values_search_not_found', 'attach_option_values_attached_option_values', 'attach_option_values_attached_option_values_number', 'attach_option_values_attached_no_values', 'attach_option_values_attached_no_values_tip', 'create_download_description', 'attach_downloads_description', 'attach_downloads_button', 'attach_downloads_modal_title', 'attach_downloads_modal_label', 'attach_downloads_modal_description', 'attach_options_modal_available_download_options', 'attach_options_modal_attached_download_options', 'attach_options_modal_attached_download_options_number', 'success_heading', 'success_message', 'edit_option_value_modal_title', 'edit_download_value_modal_title', 'edit_image', 'add_image', 'edit_image_collection', 'add_image_collection', 'new_collection', 'select_collection', 'collection_name', 'add_images', 'main_image']
Properties
$textManager
protected
TextManager
$textManager
$url
protected
Url
$url
$configurationFinder
private
ConfigurationFinder
$configurationFinder
$connection
private
Connection
$connection
$isLargeLayout
private
bool
$isLargeLayout
= false
$languageService
private
LanguageService
$languageService
$renderer
private
GambioAdminRenderer
$renderer
$translations
private
FrontendTranslations
$translations
$userPreferences
private
UserPreferences
$userPreferences
Methods
__construct()
public
__construct(Connection $connection, UserPreferences $userPreferences, AdminMenuService $adminMenuService, LanguageService $languageService, ConfigurationFinder $configurationFinder) : mixed
Parameters
- $connection : Connection
- $userPreferences : UserPreferences
- $adminMenuService : AdminMenuService
- $languageService : LanguageService
- $configurationFinder : ConfigurationFinder
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 —getProductNameById()
private
getProductNameById(int $productId) : string
Parameters
- $productId : int
Tags
Return values
string —getProductSpecialId()
private
getProductSpecialId(int $productId) : int|null
Parameters
- $productId : int