0

What utility functions are available in go_common_helper.php?

The generated app includes a custom helper. What functions does it provide and when would I use them in my own code?
Asked by Unknown Jan 28, 2026 74 views

1 Answer

0
✓ Accepted
The `go_common_helper.php` file is auto-loaded by CI Wiz-generated apps and provides these utility functions: - `goSanitize()` — sanitizes user input with configurable options: strip tags, remove JS, allow only alphanumeric, etc. Returns the sanitized value plus a malicious score. - `slugify()` — creates URL-safe slugs, handling Turkish characters and accents. - `convertTurkishCharacters()` — maps Turkish letters to ASCII equivalents. - `convertPhpDateToMomentFormat()` — converts PHP date format strings to Moment.js format strings for consistent frontend/backend date display. - `convertToSnakeCase()` / `convertToCamelCase()` — case conversion utilities used internally and in AdminLayout JS (localStorage keys for dark mode). - `newUUID()` — generates a UUID v4 string. - `checkedOrNot()` — returns a Bootstrap check icon or fallback HTML based on a boolean value, for use in list views. These are safe to call from any controller or view in the app.
Answered by cantonner Jan 28, 2026

Please sign in to post an answer. sign in