Class

ViewHelpers

ViewHelpers()

Collection of helper methods available in the views

Classes

ViewHelpers

See Details

Methods

# bulkActionUrl(options) → {string}

Returns bulkAction url

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

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

string

# bulkDeleteUrl(resourceId, recordIds, searchopt)

Returns url for a bulkDelete action in given Resource. Uses bulkActionUrl

Parameters:
Name Type Attributes Description
resourceId string

id to the resource

recordIds Array.<string>

separated by comma records

search string <optional>

optional query string

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

# dashboardUrl() → {string}

Returns URL for the dashboard

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

string

# deleteUrl(resourceId, recordId, searchopt)

Returns url for a delete action in given Resource. Uses recordActionUrl

Parameters:
Name Type Attributes Description
resourceId string

id to the resource

recordId string

id to the record

search string <optional>

optional query string

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

# editUrl(resourceId, recordId, searchopt)

Returns url for a edit action in given Resource. Uses recordActionUrl

Parameters:
Name Type Attributes Description
resourceId string

id to the resource

recordId string

id to the record

search string <optional>

optional query string

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

# listUrl(resourceId, searchopt)

Returns url for a new action in given Resource. Uses resourceActionUrl

Parameters:
Name Type Attributes Description
resourceId string

id to the resource

search string <optional>

optional query string

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

# loginUrl() → {string}

Returns login URL

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

string

# logoutUrl() → {string}

Returns logout URL

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

string

# newUrl(resourceId, searchopt)

Returns url for a new action in given Resource. Uses resourceActionUrl

Parameters:
Name Type Attributes Description
resourceId string

id to the resource

search string <optional>

optional query string

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

# 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/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/view-helpers.ts, line 159

string

# resourceActionUrl(options) → {string}

Returns resourceAction url

Parameters:
Name Type Attributes Description
options ResourceActionParams
resourceId string
actionName string
search string <optional>

optional query string

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

string

# showUrl(resourceId, recordId, searchopt)

Returns url for a show action in given Resource. Uses recordActionUrl

Parameters:
Name Type Attributes Description
resourceId string

id to the resource

recordId string

id to the record

search string <optional>

optional query string

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

Type Definitions

object

# ActionParams

Base Params for a any function

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/view-helpers.ts, line 205

object

# BulkActionParams

Params for a bulk action

Properties:
Name Type Attributes Description
recordIds Array.<string> <optional>

Array of Records ID

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

object

# RecordActionParams

Params for a record action

Properties:
Name Type Description
recordId string

Record ID

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

SoftwareBrothers

Proudly built and maintained by SoftwareBrothers

Software House with a passion for both JavaScript and TypeScript.

See what we do See what we believe in

Proudly built and maintained by

SoftwareBrothers