Documentation MyBrickStore

CommandeController extends Controller
in package

Class CommandeController

  • Manages the user's order history and downloads
  • Allows users to view past orders, download assembly plans, and parts lists

Table of Contents

Properties

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

Methods

__construct()  : mixed
Initializes the controller and loads translation strings
detail()  : void
Displays the detailed view of a specific order.
downloadCsv()  : void
Generates and forces download of a csv file containing the parts list
downloadImage()  : void
Converts the stored base64 string into a downloadable png image
downloadPlan()  : void
Renders the printable assembly plan for a specific mosaic
index()  : void
Displays a list of past orders for the authenticated user
render()  : void
Renders a view file within a layout template.
checkAuth()  : void
Helper to enforce authentication requirements

Properties

$trans

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

Holds translation strings for the current language.

$translations

private array<string|int, mixed> $translations

Key/Value pair of translations.

Methods

__construct()

Initializes the controller and loads translation strings

public __construct() : mixed

detail()

Displays the detailed view of a specific order.

public detail(int $id) : void

Aggregates the list of Lego bricks required for the entire order.

Parameters
$id : int

The unique identifier of the order.

downloadCsv()

Generates and forces download of a csv file containing the parts list

public downloadCsv(int $id) : void
Parameters
$id : int

mosaic identifier

downloadImage()

Converts the stored base64 string into a downloadable png image

public downloadImage(int $idMosaic) : void
Parameters
$idMosaic : int

mosaic identifier

downloadPlan()

Renders the printable assembly plan for a specific mosaic

public downloadPlan(int $id) : void
Parameters
$id : int

mosaic identifier

index()

Displays a list of past orders for the authenticated user

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').

checkAuth()

Helper to enforce authentication requirements

private checkAuth() : void

        
On this page

Search results