Class: CategoriesHelper

CategoriesHelper

new CategoriesHelper()

This class contains the core method implementations that belong to the categories tab of the backend services page.
Source:

Methods

bindEventHandlers()

Binds the default event handlers of the categories tab.
Source:

delete(id)

Delete category record.
Parameters:
Name Type Description
id int Record id to be deleted.
Source:

display(category)

Display a category record on the form.
Parameters:
Name Type Description
category object Contains the category data.
Source:

filter(key, selectId, display)

Filter service categories records.
Parameters:
Name Type Description
key string This key string is used to filter the category records.
selectId numeric (OPTIONAL = undefined) If set then after the filter operation the record with the given id will be selected (but not displayed).
display bool (OPTIONAL = false) If true then the selected record will be displayed on the form.
Source:

getFilterHtml(category) → {string}

Get the filter results row html code.
Parameters:
Name Type Description
category object Contains the category data.
Source:
Returns:
Returns the record html code.
Type
string

resetForm()

Bring the category form back to its initial state.
Source:

save(category)

Save a category record to the database (via ajax post).
Parameters:
Name Type Description
category object Contains the category data.
Source:

select(id, display)

Select a specific record from the current filter results. If the category id does not exist in the list then no record will be selected.
Parameters:
Name Type Description
id numeric The record id to be selected from the filter results.
display bool (OPTIONAL = false) If true then the method will display the record on the form.
Source:

validate(category)

Validate category data before save (insert or update).
Parameters:
Name Type Description
category object Contains the category data.
Source: