Documentation MyBrickStore

ImagesController extends Controller
in package

Class ImagesController

  • Handles the landing page and image upload process
  • Accessible to visitors, but upload features are restricted to active members

Table of Contents

Properties

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

Methods

__construct()  : mixed
Constructor.
index()  : void
displays the landing page (images view) * accessible to everyone (public page) * view logic will determine if upload form is shown
render()  : void
Renders a view file within a layout template.
upload()  : void
handles file uploads via ajax/post * strictly restricted to logged-in users with active accounts
view()  : void
Retrieves and displays raw image data from the database.

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()

Constructor.

public __construct() : mixed

Initializes translation services

index()

displays the landing page (images view) * accessible to everyone (public page) * view logic will determine if upload form is shown

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

upload()

handles file uploads via ajax/post * strictly restricted to logged-in users with active accounts

public upload() : void

view()

Retrieves and displays raw image data from the database.

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

        
On this page

Search results