Backend\Helpers\Backend

Source: ~/modules/backend/helpers/Backend.php

Backend Helper

See also:

Public methods

public void baseUrl($path=NULL)

Returns the base backend URL

Parameters
  • $path

public string date($dateTime, $options=array())

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

Parameters
  • $dateTime
  • $options

public string dateTime($dateTime, $options=array())

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
  • $dateTime
  • $options

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

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
  • string $file - The compilation asset file to decompile
  • boolean $skinAsset - If true, will load decompiled assets from the "skins" directory.

public void redirect($path, $status=302, $headers=array(), $secure=NULL)

Create a new redirect response to a given backend path.

Parameters
  • $path
  • $status
  • $headers
  • $secure

public void redirectGuest($path, $status=302, $headers=array(), $secure=NULL)

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

Parameters
  • $path
  • $status
  • $headers
  • $secure

public void redirectIntended($path, $status=302, $headers=array(), $secure=NULL)

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

Parameters
  • $path
  • $status
  • $headers
  • $secure

public void skinAsset($path=NULL)

Returns a URL in context of the active Backend skin

Parameters
  • $path

public void uri()

Returns the backend URI segment.

public void url($path=NULL, $parameters=array(), $secure=NULL)

Returns a URL in context of the Backend

Parameters
  • $path
  • $parameters
  • $secure