Documentation

Backend
in package

Backend Helper

Tags
see
Backend
author

Alexey Bobkov, Samuel Georges

Table of Contents

baseUrl()  : mixed
Returns the base backend URL
date()  : string
Proxy method for dateTime() using "date" format alias.
dateTime()  : string
Returns the HTML for a date formatted in the backend.
decompileAsset()  : array<string|int, mixed>
Decompiles the compilation asset files
redirect()  : mixed
Create a new redirect response to a given backend path.
redirectGuest()  : mixed
Create a new backend redirect response, while putting the current URL in the session.
redirectIntended()  : mixed
Create a new redirect response to the previously intended backend location.
skinAsset()  : mixed
Returns a URL in context of the active Backend skin
uri()  : mixed
Returns the backend URI segment.
url()  : mixed
Returns a URL in context of the Backend
parseAsset()  : array<string|int, mixed>
Parse the provided asset file to get the files that it includes

Methods

baseUrl()

Returns the base backend URL

public baseUrl([mixed $path = null ]) : mixed
Parameters
$path : mixed = null
Return values
mixed —

date()

Proxy method for dateTime() using "date" format alias.

public date(mixed $dateTime[, mixed $options = [] ]) : string
Parameters
$dateTime : mixed
$options : mixed = []
Return values
string —

dateTime()

Returns the HTML for a date formatted in the backend.

public dateTime(mixed $dateTime[, mixed $options = [] ]) : string

Supported for formatAlias: time -> 6:28 AM timeLong -> 6:28:01 AM date -> 04/23/2016 dateMin -> 4/23/2016 dateLong -> April 23, 2016 dateLongMin -> Apr 23, 2016 dateTime -> April 23, 2016 6:28 AM dateTimeMin -> Apr 23, 2016 6:28 AM dateTimeLong -> Saturday, April 23, 2016 6:28 AM dateTimeLongMin -> Sat, Apr 23, 2016 6:29 AM

Parameters
$dateTime : mixed
$options : mixed = []
Return values
string —

decompileAsset()

Decompiles the compilation asset files

public decompileAsset(string $file[, bool $skinAsset = false ]) : array<string|int, mixed>

This is used to load each individual asset file, as opposed to using the compilation assets. This is useful only for development, to allow developers to test changes without having to re-compile assets.

Parameters
$file : string

The compilation asset file to decompile

$skinAsset : bool = false

If true, will load decompiled assets from the "skins" directory.

Tags
throws
DecompileException

If the compilation file cannot be decompiled

Return values
array<string|int, mixed> —

redirect()

Create a new redirect response to a given backend path.

public redirect(mixed $path[, mixed $status = 302 ][, mixed $headers = [] ][, mixed $secure = null ]) : mixed
Parameters
$path : mixed
$status : mixed = 302
$headers : mixed = []
$secure : mixed = null
Return values
mixed —

redirectGuest()

Create a new backend redirect response, while putting the current URL in the session.

public redirectGuest(mixed $path[, mixed $status = 302 ][, mixed $headers = [] ][, mixed $secure = null ]) : mixed
Parameters
$path : mixed
$status : mixed = 302
$headers : mixed = []
$secure : mixed = null
Return values
mixed —

redirectIntended()

Create a new redirect response to the previously intended backend location.

public redirectIntended(mixed $path[, mixed $status = 302 ][, mixed $headers = [] ][, mixed $secure = null ]) : mixed
Parameters
$path : mixed
$status : mixed = 302
$headers : mixed = []
$secure : mixed = null
Return values
mixed —

skinAsset()

Returns a URL in context of the active Backend skin

public skinAsset([mixed $path = null ]) : mixed
Parameters
$path : mixed = null
Return values
mixed —

uri()

Returns the backend URI segment.

public uri() : mixed
Return values
mixed —

url()

Returns a URL in context of the Backend

public url([mixed $path = null ][, mixed $parameters = [] ][, mixed $secure = null ]) : mixed
Parameters
$path : mixed = null
$parameters : mixed = []
$secure : mixed = null
Return values
mixed —

parseAsset()

Parse the provided asset file to get the files that it includes

protected parseAsset(string $file, bool $skinAsset) : array<string|int, mixed>
Parameters
$file : string

The compilation asset file to parse

$skinAsset : bool

If true, will load decompiled assets from the "skins" directory.

Return values
array<string|int, mixed> —

Search results