Configuration
get()
Signature
Section titled “Signature”get() — returns any
Available in: controller, model, test, migrator, migration, tabledefinition
Category: Miscellaneous Functions
Description
Section titled “Description”Returns the current value of a Wheels configuration setting or the default value for a specific function argument. It can be used to inspect global Wheels settings (like table name prefixes, pagination defaults, or other configuration values) or to check what the default argument would be for a particular Wheels function.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | yes | — | Variable name to get setting for. |
functionName | string | no | — | Function name to get setting for. |
Examples
Section titled “Examples”1. Get the current value of a global Wheels setting
tablePrefix = get("tableNamePrefix");
2. Get the default message for the `validatesConfirmationOf` function
confirmationMessageDefault = get(functionName="validatesConfirmationOf", name="message");
3. Check the default value for the "null" argument in migrations
allowNullDefault = get(functionName="float", name="null");
4. Retrieve the current default number of rows per page in pagination
perPageDefault = get("perPage");