Class

ViewHelpers

ViewHelpers()

Collection of helper methods available in the views

Methods

# private assetPath(asset) → {string}

Returns absolute path to a given asset.

Parameters:
Name Type Description
asset string

View Source admin-bro/src/backend/utils/view-helpers.ts, line 134

string

# bulkActionUrl(options) → {string}

Returns bulkAction url

Parameters:
Name Type Attributes Description
options BulkActionParams
resourceId string
recordIds string <optional>
actionName string

View Source admin-bro/src/backend/utils/view-helpers.ts, line 116

string

# dashboardUrl() → {string}

Returns URL for the dashboard

View Source admin-bro/src/backend/utils/view-helpers.ts, line 63

string

# loginUrl() → {string}

Returns login URL

View Source admin-bro/src/backend/utils/view-helpers.ts, line 49

string

# logoutUrl() → {string}

Returns logout URL

View Source admin-bro/src/backend/utils/view-helpers.ts, line 56

string

# pageUrl(pageName) → {string}

Returns URL for given page name

Parameters:
Name Type Description
pageName string

page name which is a unique key specified in AdminBroOptions

View Source admin-bro/src/backend/utils/view-helpers.ts, line 72

string

# recordActionUrl(options) → {string}

Returns recordAction url

Parameters:
Name Type Description
options RecordActionParams
resourceId string
recordId string
actionName string

View Source admin-bro/src/backend/utils/view-helpers.ts, line 103

string

# resourceActionUrl(options) → {string}

Returns resourceAction url

Parameters:
Name Type Description
options ResourceActionParams
resourceId string
actionName string

View Source admin-bro/src/backend/utils/view-helpers.ts, line 87

string

# private urlBuilder(pathsopt) → {string|query}

To each related path adds rootPath passed by the user, as well as a query string

Parameters:
Name Type Attributes Description
paths Array.<string> <optional>

list of parts of the url

View Source admin-bro/src/backend/utils/view-helpers.ts, line 35

path

string

[search=''] query string which can be fetch from location.search

query

Type Definitions

object

# BulkActionParams

Params for a bulk action

Properties:
Name Type Attributes Description
resourceId string

Unique Resource ID

actionName string

Action name

recordIds Array.<string> <optional>

Array of Records ID

search string <optional>

Optional query string: ?....

View Source admin-bro/src/backend/utils/view-helpers.ts, line 159

object

# RecordActionParams

Params for a record action

Properties:
Name Type Attributes Description
resourceId string

Unique Resource ID

actionName string

Action name

recordId string

Record ID

search string <optional>

Optional query string: ?....

View Source admin-bro/src/backend/utils/view-helpers.ts, line 149

object

# ResourceActionParams

Params for a resource action

Properties:
Name Type Attributes Description
resourceId string

Unique Resource ID

actionName string

Action name

search string <optional>

Optional query string: ?....

View Source admin-bro/src/backend/utils/view-helpers.ts, line 169

object

# ResourceParams

Params for a resource list

Properties:
Name Type Attributes Description
resourceId string

Unique Resource ID

search string <optional>

Action name

View Source admin-bro/src/backend/utils/view-helpers.ts, line 178