Backend

Backend Helper

 class Backend\Helpers\Backend

Methods

public baseUrl ($path = null)

Returns the base backend URL

Parameters
Property Description
$path
mixed
Returns
mixed

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

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

Parameters
Property Description
$dateTime
mixed
$options
array
Returns
string

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

Returns the HTML for a date formatted in the backend.

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
Property Description
$dateTime
mixed
$options
array
Returns
string

public decompileAsset (string $file, boolean $skinAsset = false) : array

Decompiles the compilation asset files

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
Property Description
$file
string

The compilation asset file to decompile

$skinAsset
boolean

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

Returns
array

public static makeCarbon ($value, boolean $throwException = true) : Carbon\Carbon

Convert mixed inputs to a Carbon object and sets the backend timezone on that object

Parameters
Property Description
$value
mixed
$throwException
boolean
Returns
Carbon\Carbon

public redirect ($path, integer $status = 302, array $headers = [], $secure = null)

Create a new redirect response to a given backend path.

Parameters
Property Description
$path
mixed
$status
integer
$headers
array
$secure
mixed
Returns
mixed

public redirectGuest ($path, integer $status = 302, array $headers = [], $secure = null)

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

Parameters
Property Description
$path
mixed
$status
integer
$headers
array
$secure
mixed
Returns
mixed

public redirectIntended ($path, integer $status = 302, array $headers = [], $secure = null)

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

Parameters
Property Description
$path
mixed
$status
integer
$headers
array
$secure
mixed
Returns
mixed

public skinAsset ($path = null)

Returns a URL in context of the active Backend skin

Parameters
Property Description
$path
mixed
Returns
mixed

public uri ()

Returns the backend URI segment.

Returns
mixed

public url ($path = null, array $parameters = [], $secure = null)

Returns a URL in context of the Backend

Parameters
Property Description
$path
mixed
$parameters
array
$secure
mixed
Returns
mixed

protected parseAsset (string $file, bool $skinAsset) : array

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

Parameters
Property Description
$file
string

The compilation asset file to parse

$skinAsset
bool

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

Returns
array
Copyright © 2024 Winter CMS