new ServicesHelper()
This class contains the methods that will be used by the "Services" tab of the page.
- Source:
Methods
-
delete(id)
-
Delete a service records from database.
Parameters:
Name Type Description id
int Record id to be deleted. - Source:
-
display(service)
-
Display a service record into the service form.
Parameters:
Name Type Description service
object Contains the service record data. - Source:
-
filter(key)
-
Filters service records depending a string key.
Parameters:
Name Type Description key
string This is used to filter the service records of the database. - Source:
-
getFilterHtml(service) → {string}
-
Get a service row html code that is going to be displayed on the filter results list.
Parameters:
Name Type Description service
object Contains the service record data. - Source:
Returns:
The html code that represents the record on the filter results list.- Type
- string
-
resetForm()
-
Resets the service tab form back to its initial state.
- Source:
-
save(service)
-
Save service record to database.
Parameters:
Name Type Description service
object Contains the service record data. If an 'id' value is provided then the update operation is going to be executed. - Source:
-
validate(service) → {bool}
-
Validates a service record.
Parameters:
Name Type Description service
object Contains the service data. - Source:
Returns:
Returns the validation result.- Type
- bool