-
Notifications
You must be signed in to change notification settings - Fork 0
Helper Functions
Alex Torscho edited this page Jan 11, 2015
·
1 revision
In /vendor/atorscho/backend/src/helpers folder you may find several files:
-
misc.php: other functions. -
outputs.php: all functions that output an HTML. -
users.php: functions that have direct relation to users.
-
toObjects(): recursively converts nested arrays to nested objects ofstdClass. -
getSetting(): returns the value of a setting handle stored insettingsDB table. -
index(): simply increments a static variable with each call. Useful for counters andtabindexHTML attributes. -
getDateFormat(): outputs a date in a date format specified in Settings. -
getDateTimeFormat(): outputs a date in a datetime format specified in Settings. -
datetimePicker(): outputs a datetime in a format that DatetimePicker jQuery plugin uses. -
saveCustomField(): created rules and field names from custom field names. -
counter(): a counter for paginated pages. You can see an example on Users page. -
transIfExists(): the function that is used to dynamically display a localized or normal string inFlashHelperandTemplateHelper.
-
flash(): a helper to output the Flash Message alert. -
customFieldInput(): a function that outputs a correct input depending on the field type and options. -
iconList(): simply returns an array of all Font-Awesome icons.
-
addPermissionsToGroup(): attach permissions to specified group. -
in(): check whether the authenticated user is in specified group. -
can(): check whether the authenticated user has specific permission.