Documentation MyBrickStore

SettingController extends Controller
in package

Class SettingController

  • Manages user preferences including language selection,
  • Visual theme toggling, and displaying the settings interface

Table of Contents

Properties

$trans  : array<string|int, mixed>
$translation_model  : array<string|int, mixed>

Methods

__construct()  : mixed
Constructor.
index()  : void
Displays the settings page and handles theme switching logic
render()  : void
Renders a view file within a layout template.
setLanguage()  : void
Updates the session language and redirects user back to previous page

Properties

$trans

protected array<string|int, mixed> $trans = []

Holds translation strings for the current language.

$translation_model

private array<string|int, mixed> $translation_model

Key/Value pair of translations.

Methods

__construct()

Constructor.

public __construct() : mixed

Initializes the controller with translation capabilities

index()

Displays the settings page and handles theme switching logic

public index() : void

render()

Renders a view file within a layout template.

public render(string $file[, array<string|int, mixed> $data = [] ][, string $template = 'default' ]) : void
Parameters
$file : string

The name of the view file (without .php extension).

$data : array<string|int, mixed> = []

Associative array of data to pass to the view.

$template : string = 'default'

The layout template to use (default: 'default').

setLanguage()

Updates the session language and redirects user back to previous page

public setLanguage() : void

        
On this page

Search results