

{"sections":[{"categories":["Miscellaneous Functions","Routing"],"name":"Configuration"},{"categories":["Configuration Functions","Flash Functions","Miscellaneous Functions","Pagination Functions","Provides Functions","Rendering Functions"],"name":"Controller"},{"categories":["Date Functions","Miscellaneous Functions","String Functions"],"name":"Global Helpers"},{"categories":["General Functions","Migration Functions","Table Definition Functions"],"name":"Migrator"},{"categories":["Create Functions","CRUD Functions","Delete Functions","Miscellaneous Functions","Read Functions","Statistics Functions","Update Functions"],"name":"Model Class"},{"categories":["Association Functions","Callback Functions","Miscellaneous Functions","Validation Functions"],"name":"Model Configuration"},{"categories":["Change Functions","CRUD Functions","Error Functions","Miscellaneous Functions"],"name":"Model Object"},{"categories":["Callback Functions"],"name":"Test Model Configuration"},{"categories":["Testing Functions"],"name":"Test Model"},{"categories":["Asset Functions","Error Functions","Form Association Functions","Form Object Functions","Form Tag Functions","General Form Functions","Link Functions","Miscellaneous Functions","Sanitization Functions"],"name":"View Helpers"}],"functions":[{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Make `isActive` the only property that can be set through mass assignment operations like `updateAll()`.\nconfig() {\n\taccessibleProperties(&quot;isActive&quot;);\n}\n</code></pre>"},"hint":"Use this method to specify which properties can be set through mass assignment.\r\n\r\n","returntype":"void","slug":"model.accessibleProperties","parameters":[{"default":"","required":false,"hint":"Property name (or list of property names) that are allowed to be altered through mass assignment.","name":"properties","type":"string"}],"availableIn":["model"],"name":"accessibleProperties","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"modelconfiguration","category":"Miscellaneous Functions","section":"Model Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>addColumn(table='members', columnType='string', columnName='status', limit=50);\n</code></pre>"},"hint":"adds a column to existing table\r\nOnly available in a migration CFC\r\n\r\n","returntype":"void","slug":"migration.addColumn","parameters":[{"required":true,"hint":"The Name of the table to add the column to","name":"table","type":"string"},{"required":true,"hint":"The type of the new column","name":"columnType","type":"string"},{"default":"","required":true,"hint":"THe name of the new column","name":"columnName","type":"string"},{"default":"","required":false,"hint":"The name of the column which this column should be inserted after","name":"afterColumn","type":"string"},{"default":"","required":false,"hint":"Name for new reference column, see documentation for references function, required if columnType is 'reference'","name":"referenceName","type":"string"},{"required":false,"hint":"Default value for this column","name":"default","type":"string"},{"required":false,"hint":"Whether to allow NULL values","name":"null","type":"boolean"},{"required":false,"hint":"Character or integer size limit for column","name":"limit","type":"numeric"},{"required":false,"hint":"precision value for decimal columns, i.e. number of digits the column can hold","name":"precision","type":"numeric"},{"required":false,"hint":"scale value for decimal columns, i.e. number of digits that can be placed to the right of the decimal point (must be less than or equal to precision)","name":"scale","type":"numeric"}],"availableIn":["migration"],"name":"addColumn","tags":{"categoryClass":"migrationfunctions","sectionClass":"migrator","category":"Migration Functions","section":"Migrator"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Add an error to the `email` property.\nthis.addError(property=&quot;email&quot;, message=&quot;Sorry, you are not allowed to use that email. Try again, please.&quot;);\n</code></pre>"},"hint":"Adds an error on a specific property.\r\n\r\n","returntype":"void","slug":"model.addError","parameters":[{"required":true,"hint":"The name of the property you want to add an error on.","name":"property","type":"string"},{"required":true,"hint":"The error message (such as \"Please enter a correct name in the form field\" for example).","name":"message","type":"string"},{"default":"","required":false,"hint":"A name to identify the error by (useful when you need to distinguish one error from another one set on the same object and you don't want to use the error message itself for that).","name":"name","type":"string"}],"availableIn":["model"],"name":"addError","tags":{"categoryClass":"errorfunctions","sectionClass":"modelobject","category":"Error Functions","section":"Model Object"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Add an error on the object that's not specific to a single property.\nthis.addErrorToBase(message=&quot;Your email address must be the same as your domain name.&quot;);\n</code></pre>"},"hint":"Adds an error on a specific property.\r\n\r\n","returntype":"void","slug":"model.addErrorToBase","parameters":[{"required":true,"hint":"The error message (such as \"Please enter a correct name in the form field\" for example).","name":"message","type":"string"},{"default":"","required":false,"hint":"A name to identify the error by (useful when you need to distinguish one error from another one set on the same object and you don't want to use the error message itself for that).","name":"name","type":"string"}],"availableIn":["model"],"name":"addErrorToBase","tags":{"categoryClass":"errorfunctions","sectionClass":"modelobject","category":"Error Functions","section":"Model Object"}},{"extended":{"hasExtended":false,"docs":""},"hint":"Add a foreign key constraint to the database, using the reference name that was used to create it\r\nOnly available in a migration CFC\r\n\r\n","returntype":"void","slug":"migration.addForeignKey","parameters":[{"required":true,"hint":"The table name to perform the operation on","name":"table","type":"string"},{"required":true,"hint":"The reference table name to perform the operation on","name":"referenceTable","type":"string"},{"required":true,"hint":"The column name to perform the operation on","name":"column","type":"string"},{"required":true,"hint":"The reference column name to perform the operation on","name":"referenceColumn","type":"string"}],"availableIn":["migration"],"name":"addForeignKey","tags":{"categoryClass":"migrationfunctions","sectionClass":"migrator","category":"Migration Functions","section":"Migrator"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Add the `js` format\naddFormat(extension=&quot;js&quot;, mimeType=&quot;text/javascript&quot;);\n\n// Add the `ppt` and `pptx` formats\naddFormat(extension=&quot;ppt&quot;, mimeType=&quot;application/vnd.ms-powerpoint&quot;);\naddFormat(extension=&quot;pptx&quot;, mimeType=&quot;application/vnd.ms-powerpoint&quot;);</code></pre>"},"hint":"Adds a new MIME type to your CFWheels application for use with responding to multiple formats.\r\n\r\n","returntype":"void","slug":"controller.addFormat","parameters":[{"required":true,"hint":"File extension to add.","name":"extension","type":"string"},{"required":true,"hint":"Matching MIME type to associate with the file extension.","name":"mimeType","type":"string"}],"availableIn":["controller","model","test","migrator","migration","tabledefinition"],"name":"addFormat","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"configuration","category":"Miscellaneous Functions","section":"Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>addIndex(table='members', columnNames='username', unique=true);\n</code></pre>"},"hint":"Add database index on a table column\r\nOnly available in a migration CFC\r\n\r\n","returntype":"void","slug":"migration.addIndex","parameters":[{"required":true,"hint":"The table name to perform the index operation on","name":"table","type":"string"},{"required":false,"hint":"One or more column names to index, comma separated","name":"columnNames","type":"string"},{"default":"false","required":false,"hint":"If true will create a unique index constraint","name":"unique","type":"boolean"},{"default":"[runtime expression]","required":false,"hint":"The name of the index to add: Defaults to table name + underscore + first column name","name":"indexName","type":"string"}],"availableIn":["migration"],"name":"addIndex","tags":{"categoryClass":"migrationfunctions","sectionClass":"migrator","category":"Migration Functions","section":"Migrator"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>addRecord(table='people',\n\t\tid = 1,\n\t\ttitle = &quot;Mr&quot;,\n\t\tfirstname = &quot;Bruce&quot;,\n\t\tlastname = &quot;Wayne&quot;, \n\t\temail = &quot;bruce@wayneenterprises.com&quot;,\n\t\ttel = &quot;555-67869099&quot;, \n);\n</code></pre>"},"hint":"Adds a record to a table\r\nOnly available in a migration CFC\r\n\r\n","returntype":"void","slug":"migration.addRecord","parameters":[{"required":true,"hint":"The table name to add the record to","name":"table","type":"string"}],"availableIn":["migration"],"name":"addRecord","tags":{"categoryClass":"migrationfunctions","sectionClass":"migrator","category":"Migration Functions","section":"Migrator"}},{"extended":{"hasExtended":false,"docs":""},"hint":"Add a foreign key constraint to the database, using the reference name that was used to create it\r\nOnly available in a migration CFC\r\n\r\n","returntype":"void","slug":"migration.addReference","parameters":[{"required":true,"hint":"The table name to perform the operation on","name":"table","type":"string"},{"required":true,"hint":"The reference table name to perform the operation on","name":"referenceName","type":"string"}],"availableIn":["migration"],"name":"addReference","tags":{"categoryClass":"migrationfunctions","sectionClass":"migrator","category":"Migration Functions","section":"Migrator"}},{"extended":{"hasExtended":false,"docs":""},"hint":"Executes once after the test suite runs.\r\n\r\n","returntype":"any","slug":"test.afterAll","parameters":[],"availableIn":["test"],"name":"afterAll","tags":{"categoryClass":"callbackfunctions","sectionClass":"testmodelconfiguration","category":"Callback Functions","section":"Test Model Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Instruct CFWheels to call the `fixObj` method after an object has been created.\nafterCreate(&quot;fixObj&quot;);\n</code></pre>"},"hint":"Registers method(s) that should be called after a new object is created.\r\n\r\n","returntype":"void","slug":"model.afterCreate","parameters":[{"default":"","required":false,"hint":"Method name or list of method names that should be called when this callback event occurs in an object's life cycle (can also be called with the `method` argument).","name":"methods","type":"string"}],"availableIn":["model"],"name":"afterCreate","tags":{"categoryClass":"callbackfunctions","sectionClass":"modelconfiguration","category":"Callback Functions","section":"Model Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Instruct CFWheels to call the `fixObj` method after an object has been deleted.\nafterDelete(&quot;fixObj&quot;);\n</code></pre>"},"hint":"Registers method(s) that should be called after an object is deleted.\r\n\r\n","returntype":"void","slug":"model.afterDelete","parameters":[{"default":"","required":false,"hint":"Method name or list of method names that should be called when this callback event occurs in an object's life cycle (can also be called with the `method` argument).","name":"methods","type":"string"}],"availableIn":["model"],"name":"afterDelete","tags":{"categoryClass":"callbackfunctions","sectionClass":"modelconfiguration","category":"Callback Functions","section":"Model Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Instruct CFWheels to call the `setTime` method after getting objects or records with one of the finder methods.\nconfig() {\n\tafterFind(&quot;setTime&quot;);\n}\n\nfunction setTime(){\n\targuments.fetchedAt = Now();\n\treturn arguments;\n}\n</code></pre>"},"hint":"Registers method(s) that should be called after an existing object has been initialized (which is usually done with the <code>findByKey</code> or <code>findOne</code> method).\r\n\r\n","returntype":"void","slug":"model.afterFind","parameters":[{"default":"","required":false,"hint":"Method name or list of method names that should be called when this callback event occurs in an object's life cycle (can also be called with the `method` argument).","name":"methods","type":"string"}],"availableIn":["model"],"name":"afterFind","tags":{"categoryClass":"callbackfunctions","sectionClass":"modelconfiguration","category":"Callback Functions","section":"Model Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Instruct CFWheels to call the `fixObj` method after an object has been initialized (i.e. after creating it or fetching it with a finder method).\nafterInitialization(&quot;fixObj&quot;);\n</code></pre>"},"hint":"Registers method(s) that should be called after an object has been initialized.\r\n\r\n","returntype":"void","slug":"model.afterInitialization","parameters":[{"default":"","required":false,"hint":"Method name or list of method names that should be called when this callback event occurs in an object's life cycle (can also be called with the `method` argument).","name":"methods","type":"string"}],"availableIn":["model"],"name":"afterInitialization","tags":{"categoryClass":"callbackfunctions","sectionClass":"modelconfiguration","category":"Callback Functions","section":"Model Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Instruct CFWheels to call the `fixObj` method after a new object has been created.\nafterNew(&quot;fixObj&quot;);\n</code></pre>"},"hint":"Registers method(s) that should be called after a new object has been initialized (which is usually done with the <code>new</code> method).\r\n\r\n","returntype":"void","slug":"model.afterNew","parameters":[{"default":"","required":false,"hint":"Method name or list of method names that should be called when this callback event occurs in an object's life cycle (can also be called with the `method` argument).","name":"methods","type":"string"}],"availableIn":["model"],"name":"afterNew","tags":{"categoryClass":"callbackfunctions","sectionClass":"modelconfiguration","category":"Callback Functions","section":"Model Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Instruct CFWheels to call the `fixObj` method after an object has been saved.\nafterSave(&quot;fixObj&quot;);\n</code></pre>"},"hint":"Registers method(s) that should be called after an object is saved.\r\n\r\n","returntype":"void","slug":"model.afterSave","parameters":[{"default":"","required":false,"hint":"Method name or list of method names that should be called when this callback event occurs in an object's life cycle (can also be called with the `method` argument).","name":"methods","type":"string"}],"availableIn":["model"],"name":"afterSave","tags":{"categoryClass":"callbackfunctions","sectionClass":"modelconfiguration","category":"Callback Functions","section":"Model Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Instruct CFWheels to call the `fixObj` method after an object has been updated.\nafterUpdate(&quot;fixObj&quot;);\n</code></pre>"},"hint":"Registers method(s) that should be called after an existing object is updated.\r\n\r\n","returntype":"void","slug":"model.afterUpdate","parameters":[{"default":"","required":false,"hint":"Method name or list of method names that should be called when this callback event occurs in an object's life cycle (can also be called with the `method` argument).","name":"methods","type":"string"}],"availableIn":["model"],"name":"afterUpdate","tags":{"categoryClass":"callbackfunctions","sectionClass":"modelconfiguration","category":"Callback Functions","section":"Model Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Instruct CFWheels to call the `fixObj` method after an object has been validated.\nafterValidation(&quot;fixObj&quot;);\n</code></pre>"},"hint":"Registers method(s) that should be called after an object is validated.\r\n\r\n","returntype":"void","slug":"model.afterValidation","parameters":[{"default":"","required":false,"hint":"Method name or list of method names that should be called when this callback event occurs in an object's life cycle (can also be called with the `method` argument).","name":"methods","type":"string"}],"availableIn":["model"],"name":"afterValidation","tags":{"categoryClass":"callbackfunctions","sectionClass":"modelconfiguration","category":"Callback Functions","section":"Model Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Instruct CFWheels to call the `fixObj` method after a new object has been validated.\nafterValidationOnCreate(&quot;fixObj&quot;);\n</code></pre>"},"hint":"Registers method(s) that should be called after a new object is validated.\r\n\r\n","returntype":"void","slug":"model.afterValidationOnCreate","parameters":[{"default":"","required":false,"hint":"Method name or list of method names that should be called when this callback event occurs in an object's life cycle (can also be called with the `method` argument).","name":"methods","type":"string"}],"availableIn":["model"],"name":"afterValidationOnCreate","tags":{"categoryClass":"callbackfunctions","sectionClass":"modelconfiguration","category":"Callback Functions","section":"Model Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Instruct CFWheels to call the `fixObj` method after an existing object has been validated.\nafterValidationOnUpdate(&quot;fixObj&quot;);\n</code></pre>"},"hint":"Registers method(s) that should be called after an existing object is validated.\r\n\r\n","returntype":"void","slug":"model.afterValidationOnUpdate","parameters":[{"default":"","required":false,"hint":"Method name or list of method names that should be called when this callback event occurs in an object's life cycle (can also be called with the `method` argument).","name":"methods","type":"string"}],"availableIn":["model"],"name":"afterValidationOnUpdate","tags":{"categoryClass":"callbackfunctions","sectionClass":"modelconfiguration","category":"Callback Functions","section":"Model Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Get an object, change it, and then ask for its changes (will return a struct containing the changes, both property names and their values).\nmember = model(&quot;member&quot;).findByKey(params.memberId);\nmember.firstName = params.newFirstName;\nmember.email = params.newEmail;\nallChanges = member.allChanges();\n</code></pre>"},"hint":"Returns a struct detailing all changes that have been made on the object but not yet saved to the database.\r\n\r\n","returntype":"struct","slug":"model.allChanges","parameters":[],"availableIn":["model"],"name":"allChanges","tags":{"categoryClass":"changefunctions","sectionClass":"modelobject","category":"Change Functions","section":"Model Object"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Get all the errors for the `user` object.\nerrorInfo = user.allErrors();\n\n// Sample return of method.\n[\n\t{\n  \tmessage: 'Username must not be blank.',\n    name: 'usernameError',\n    property: 'username'\n  },\n  {\n  \tmessage: 'Password must not be blank.',\n    name: 'passwordError',\n    property: 'password'\n  }\n]\n</code></pre>"},"hint":"Returns an array of all the errors on the object.\r\n\r\n\r\nIt does this by storing instances of models that are associations, and not checking associations of those instances because they have already been checked.","returntype":"array","slug":"model.allErrors","parameters":[{"default":false,"required":false,"name":"includeAssociations","type":"boolean"},{"default":"[runtime expression]","required":false,"hint":"is a private argument not meant to be used by the user, the function uses this to ensure circular dependency avoidance.","name":"seenErrors","type":"array"}],"availableIn":["model"],"name":"allErrors","tags":{"categoryClass":"errorfunctions","sectionClass":"modelobject","category":"Error Functions","section":"Model Object"}},{"extended":{"hasExtended":false,"docs":""},"hint":"","returntype":"any","slug":"migration.announce","parameters":[{"required":true,"name":"message","type":"string"}],"availableIn":["migration","tabledefinition"],"name":"announce","tags":{"categoryClass":"","sectionClass":"","category":"","section":""}},{"extended":{"hasExtended":false,"docs":""},"hint":"","returntype":"void","slug":"test.assert","parameters":[{"required":true,"name":"expression","type":"string"}],"availableIn":["test"],"name":"assert","tags":{"categoryClass":"","sectionClass":"","category":"","section":""}},{"extended":{"hasExtended":false,"docs":""},"hint":"Returns the raw CSRF authenticity token\r\n\r\n","returntype":"string","slug":"controller.authenticityToken","parameters":[],"availableIn":["controller"],"name":"authenticityToken","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"controller","category":"Miscellaneous Functions","section":"Controller"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;!--- Needed here because we're not using `startFormTag`. ---&gt;\n&lt;form action=&quot;#urlFor(route='posts')#&quot; method=&quot;post&quot;&gt;\n  #authenticityTokenField()#\n&lt;/form&gt;\n  \n&lt;!--- Not needed here because we're not POSTing the form. ---&gt;\n&lt;form action=&quot;#urlFor(route='invoices')#&quot; method=&quot;get&quot;&gt;\n&lt;/form&gt;</code></pre>"},"hint":"Returns a hidden form field containing a new authenticity token.\r\n\r\n","returntype":"string","slug":"controller.authenticityTokenField","parameters":[],"availableIn":["controller"],"name":"authenticityTokenField","tags":{"categoryClass":"generalformfunctions","sectionClass":"viewhelpers","category":"General Form Functions","section":"View Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;!--- Will output: Download CFWheels from &lt;a href=&quot;http://cfwheels.org/download&quot;&gt;http://cfwheels.org/download&lt;/a&gt; ---&gt;\n#autoLink(&quot;Download CFWheels from http://cfwheels.org/download&quot;)#\n\n&lt;!--- Will output: Email us at &lt;a href=&quot;mailto:info@cfwheels.org&quot;&gt;info@cfwheels.org&lt;/a&gt; ---&gt;\n#autoLink(&quot;Email us at info@cfwheels.org&quot;)#</code></pre>"},"hint":"Turns all URLs and email addresses into links.\r\n\r\n","returntype":"string","slug":"controller.autoLink","parameters":[{"required":true,"hint":"The text to create links in.","name":"text","type":"string"},{"default":"all","required":false,"hint":"Whether to link URLs, email addresses or both. Possible values are: `all` (default), `URLs` and `emailAddresses`.","name":"link","type":"string"},{"default":true,"required":false,"hint":"Should we auto-link relative urls.","name":"relative","type":"boolean"},{"default":true,"required":false,"hint":"Use this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to `true` to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to `attributes` to only encode attribute values and not tag content.","name":"encode","type":"boolean"}],"availableIn":["controller"],"name":"autoLink","tags":{"categoryClass":"linkfunctions","sectionClass":"viewhelpers","category":"Link Functions","section":"View Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Disable automatic validations (for example when automatic validations are enabled globally, but we want to disable just for this model).\nconfig() {\n\tautomaticValidations(false);\n}\n</code></pre>"},"hint":"Whether or not to enable default validations for this model.\r\n\r\n","returntype":"void","slug":"model.automaticValidations","parameters":[{"required":true,"hint":"Set to `true` or `false`.","name":"value","type":"boolean"}],"availableIn":["model"],"name":"automaticValidations","tags":{"categoryClass":"validationfunctions","sectionClass":"modelconfiguration","category":"Validation Functions","section":"Model Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Get the average salary for all employees.\navgSalary = model(&quot;employee&quot;).average(&quot;salary&quot;);\n\n// Get the average salary for employees in a given department.\navgSalary = model(&quot;employee&quot;).average(property=&quot;salary&quot;, where=&quot;departmentId=#params.key#&quot;);\n\n// Make sure a numeric value is always returned if no records are calculated.\navgSalary = model(&quot;employee&quot;).average(property=&quot;salary&quot;, where=&quot;salary BETWEEN #params.min# AND #params.max#&quot;, ifNull=0);\n</code></pre>"},"hint":"Calculates the average value for a given property.\r\nUses the SQL function <code>AVG</code>.\r\nIf no records can be found to perform the calculation on you can use the <code>ifNull</code> argument to decide what should be returned.\r\n\r\n","returntype":"any","slug":"model.average","parameters":[{"required":true,"hint":"Name of the property to calculate the average for.","name":"property","type":"string"},{"default":"","required":false,"hint":"Maps to the `WHERE` clause of the query (or `HAVING` when necessary). The following operators are supported: `=`, `!=`, `<>`, `<`, `<=`, `>`, `>=`, `LIKE`, `NOT LIKE`, `IN`, `NOT IN`, `IS NULL`, `IS NOT NULL`, `AND`, and `OR` (note that the key words need to be written in upper case). You can also use parentheses to group statements. You do not need to specify the table name(s); CFWheels will do that for you.","name":"where","type":"string"},{"default":"","required":false,"hint":"Associations that should be included in the query using `INNER` or `LEFT OUTER` joins (which join type that is used depends on how the association has been set up in your model). If all included associations are set on the current model, you can specify them in a list (e.g. `department,addresses,emails`). You can build more complex include strings by using parentheses when the association is set on an included model, like `album(artist(genre))`, for example. These complex `include` strings only work when `returnAs` is set to `query` though.","name":"include","type":"string"},{"default":false,"required":false,"hint":"When `true`, `AVG` will be performed only on each unique instance of a value, regardless of how many times the value occurs.","name":"distinct","type":"boolean"},{"default":true,"required":false,"hint":"Set to `true` to use `cfqueryparam` on all columns, or pass in a list of property names to use `cfqueryparam` on those only.","name":"parameterize","type":"any"},{"default":"","required":false,"hint":"The value returned if no records are found. Common usage is to set this to `0` to make sure a numeric value is always returned instead of a blank string.","name":"ifNull","type":"any"},{"default":"false","required":false,"hint":"Set to `true` to include soft-deleted records in the queries that this method runs.","name":"includeSoftDeletes","type":"boolean"},{"required":false,"hint":"Maps to the `GROUP BY` clause of the query. You do not need to specify the table name(s); CFWheels will do that for you.","name":"group","type":"string"}],"availableIn":["model"],"name":"average","tags":{"categoryClass":"statisticsfunctions","sectionClass":"modelclass","category":"Statistics Functions","section":"Model Class"}},{"extended":{"hasExtended":false,"docs":""},"hint":"Executes once before the test suite runs.\r\n\r\n","returntype":"any","slug":"test.beforeAll","parameters":[],"availableIn":["test"],"name":"beforeAll","tags":{"categoryClass":"callbackfunctions","sectionClass":"testmodelconfiguration","category":"Callback Functions","section":"Test Model Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Instruct CFWheels to call the `fixObj` method\nbeforeCreate(&quot;fixObj&quot;);</code></pre>"},"hint":"Registers method(s) that should be called before a new object is created.\r\n\r\n","returntype":"void","slug":"model.beforeCreate","parameters":[{"default":"","required":false,"hint":"Method name or list of method names that should be called when this callback event occurs in an object's life cycle (can also be called with the `method` argument).","name":"methods","type":"string"}],"availableIn":["model"],"name":"beforeCreate","tags":{"categoryClass":"callbackfunctions","sectionClass":"modelconfiguration","category":"Callback Functions","section":"Model Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Instruct CFWheels to call the `fixObj` method\nbeforeDelete(&quot;fixObj&quot;);</code></pre>"},"hint":"Registers method(s) that should be called before an object is deleted.\r\n\r\n","returntype":"void","slug":"model.beforeDelete","parameters":[{"default":"","required":false,"hint":"Method name or list of method names that should be called when this callback event occurs in an object's life cycle (can also be called with the `method` argument).","name":"methods","type":"string"}],"availableIn":["model"],"name":"beforeDelete","tags":{"categoryClass":"callbackfunctions","sectionClass":"modelconfiguration","category":"Callback Functions","section":"Model Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Instruct CFWheels to call the `fixObj` method\nbeforeSave(&quot;fixObj&quot;);</code></pre>"},"hint":"Registers method(s) that should be called before an object is saved.\r\n\r\n","returntype":"void","slug":"model.beforeSave","parameters":[{"default":"","required":false,"hint":"Method name or list of method names that should be called when this callback event occurs in an object's life cycle (can also be called with the `method` argument).","name":"methods","type":"string"}],"availableIn":["model"],"name":"beforeSave","tags":{"categoryClass":"callbackfunctions","sectionClass":"modelconfiguration","category":"Callback Functions","section":"Model Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Instruct CFWheels to call the `fixObj` method\nbeforeUpdate(&quot;fixObj&quot;);</code></pre>"},"hint":"Registers method(s) that should be called before an existing object is updated.\r\n\r\n","returntype":"void","slug":"model.beforeUpdate","parameters":[{"default":"","required":false,"hint":"Method name or list of method names that should be called when this callback event occurs in an object's life cycle (can also be called with the `method` argument).","name":"methods","type":"string"}],"availableIn":["model"],"name":"beforeUpdate","tags":{"categoryClass":"callbackfunctions","sectionClass":"modelconfiguration","category":"Callback Functions","section":"Model Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Instruct CFWheels to call the `fixObj` method\nbeforeValidation(&quot;fixObj&quot;);</code></pre>"},"hint":"Registers method(s) that should be called before an object is validated.\r\n\r\n","returntype":"void","slug":"model.beforeValidation","parameters":[{"default":"","required":false,"hint":"Method name or list of method names that should be called when this callback event occurs in an object's life cycle (can also be called with the `method` argument).","name":"methods","type":"string"}],"availableIn":["model"],"name":"beforeValidation","tags":{"categoryClass":"callbackfunctions","sectionClass":"modelconfiguration","category":"Callback Functions","section":"Model Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Instruct CFWheels to call the `fixObj` method\nbeforeValidationOnCreate(&quot;fixObj&quot;);</code></pre>"},"hint":"Registers method(s) that should be called before a new object is validated.\r\n\r\n","returntype":"void","slug":"model.beforeValidationOnCreate","parameters":[{"default":"","required":false,"hint":"Method name or list of method names that should be called when this callback event occurs in an object's life cycle (can also be called with the `method` argument).","name":"methods","type":"string"}],"availableIn":["model"],"name":"beforeValidationOnCreate","tags":{"categoryClass":"callbackfunctions","sectionClass":"modelconfiguration","category":"Callback Functions","section":"Model Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Instruct CFWheels to call the `fixObj` method\nbeforeValidationOnUpdate(&quot;fixObj&quot;);</code></pre>"},"hint":"Registers method(s) that should be called before an existing object is validated.\r\n\r\n","returntype":"void","slug":"model.beforeValidationOnUpdate","parameters":[{"default":"","required":false,"hint":"Method name or list of method names that should be called when this callback event occurs in an object's life cycle (can also be called with the `method` argument).","name":"methods","type":"string"}],"availableIn":["model"],"name":"beforeValidationOnUpdate","tags":{"categoryClass":"callbackfunctions","sectionClass":"modelconfiguration","category":"Callback Functions","section":"Model Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Specify that instances of this model belong to an author. (The table for this model should have a foreign key set on it, typically named `authorid`.)\nbelongsTo(&quot;author&quot;);\n\n// Same as above, but because we have broken away from the foreign key naming convention, we need to set `modelName` and `foreignKey`.\nbelongsTo(name=&quot;bookWriter&quot;, modelName=&quot;author&quot;, foreignKey=&quot;authorId&quot;);\n</code></pre>"},"hint":"Sets up a <code>belongsTo</code> association between this model and the specified one.\r\nUse this association when this model contains a foreign key referencing another model.\r\n\r\n","returntype":"void","slug":"model.belongsTo","parameters":[{"required":true,"hint":"Gives the association a name that you refer to when working with the association (in the `include` argument to `findAll`, to name one example).","name":"name","type":"string"},{"default":"","required":false,"hint":"Name of associated model (usually not needed if you follow CFWheels conventions because the model name will be deduced from the `name` argument).","name":"modelName","type":"string"},{"default":"","required":false,"hint":"Foreign key property name (usually not needed if you follow CFWheels conventions since the foreign key name will be deduced from the `name` argument).","name":"foreignKey","type":"string"},{"default":"","required":false,"hint":"Column name to join to if not the primary key (usually not needed if you follow CFWheels conventions since the join key will be the table's primary key/keys).","name":"joinKey","type":"string"},{"default":"inner","required":false,"hint":"Use to set the join type when joining associated tables. Possible values are `inner` (for `INNER JOIN`) and `outer` (for `LEFT OUTER JOIN`).","name":"joinType","type":"string"}],"availableIn":["model"],"name":"belongsTo","tags":{"categoryClass":"associationfunctions","sectionClass":"modelconfiguration","category":"Association Functions","section":"Model Configuration"}},{"extended":{"hasExtended":false,"docs":""},"hint":"Adds integer columns to table definition.\r\n\r\n","returntype":"any","slug":"tabledefinition.bigInteger","parameters":[{"required":false,"name":"columnNames","type":"string"},{"required":false,"name":"limit","type":"numeric"},{"required":false,"name":"default","type":"string"},{"required":false,"name":"null","type":"boolean"}],"availableIn":["tabledefinition"],"name":"bigInteger","tags":{"categoryClass":"tabledefinitionfunctions","sectionClass":"migrator","category":"Table Definition Functions","section":"Migrator"}},{"extended":{"hasExtended":false,"docs":""},"hint":"Adds binary columns to table definition.\r\n\r\n","returntype":"any","slug":"tabledefinition.binary","parameters":[{"required":false,"name":"columnNames","type":"string"},{"required":false,"name":"default","type":"string"},{"required":false,"name":"null","type":"boolean"}],"availableIn":["tabledefinition"],"name":"binary","tags":{"categoryClass":"tabledefinitionfunctions","sectionClass":"migrator","category":"Table Definition Functions","section":"Migrator"}},{"extended":{"hasExtended":false,"docs":""},"hint":"Adds boolean columns to table definition.\r\n\r\n","returntype":"any","slug":"tabledefinition.boolean","parameters":[{"required":false,"name":"columnNames","type":"string"},{"required":false,"name":"default","type":"string"},{"required":false,"name":"null","type":"boolean"}],"availableIn":["tabledefinition"],"name":"boolean","tags":{"categoryClass":"tabledefinitionfunctions","sectionClass":"migrator","category":"Table Definition Functions","section":"Migrator"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;!--- View Code ---&gt;\n#startFormTag(action=&quot;something&quot;)#\n    &lt;!--- Form Controls go here ---&gt;\n    #buttonTag(content=&quot;Submit this form&quot;, value=&quot;save&quot;)#\n#endFormTag()#\n</code></pre>"},"hint":"Builds and returns a string containing a button form control.\r\n\r\n","returntype":"string","slug":"controller.buttonTag","parameters":[{"default":"Save changes","required":false,"hint":"Content to display inside the button.","name":"content","type":"string"},{"default":"submit","required":false,"hint":"The type for the button: `button`, `reset`, or `submit`.","name":"type","type":"string"},{"default":"save","required":false,"hint":"The value of the button when submitted.","name":"value","type":"string"},{"default":"","required":false,"hint":"File name of the image file to use in the button form control.","name":"image","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control. Useful to wrap the form control with HTML tags.","name":"prepend","type":"string"},{"default":"","required":false,"hint":"String to append to the form control. Useful to wrap the form control with HTML tags.","name":"append","type":"string"},{"default":true,"required":false,"hint":"Use this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to `true` to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to `attributes` to only encode attribute values and not tag content.","name":"encode","type":"any"}],"availableIn":["controller"],"name":"buttonTag","tags":{"categoryClass":"generalformfunctions","sectionClass":"viewhelpers","category":"General Form Functions","section":"View Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>#buttonTo(text=&quot;Delete Account&quot;, action=&quot;perFormDelete&quot;, disable=&quot;Wait...&quot;)#\n\n&lt;!--- apply attributes to the input element by prefixing any arguments with &quot;input&quot;---&gt;\n#buttonTo(text=&quot;Edit&quot;, action=&quot;edit&quot;, inputId=&quot;edit-button&quot;, inputClass=&quot;edit-button-class&quot;)#</code></pre>"},"hint":"Creates a form containing a single button that submits to the URL.\r\nThe URL is built the same way as the <code>linkTo</code> function.\r\n\r\n","returntype":"string","slug":"controller.buttonTo","parameters":[{"default":"","required":false,"hint":"The text content of the button.","name":"text","type":"string"},{"default":"","required":false,"hint":"If you want to use an image for the button pass in the link to it here (relative from the `images` folder).","name":"image","type":"string"},{"default":"","required":false,"hint":"Name of a route that you have configured in `config/routes.cfm`.","name":"route","type":"string"},{"default":"","required":false,"hint":"Name of the controller to include in the URL.","name":"controller","type":"string"},{"default":"","required":false,"hint":"Name of the action to include in the URL.","name":"action","type":"string"},{"default":"","required":false,"hint":"Key(s) to include in the URL.","name":"key","type":"any"},{"default":"","required":false,"hint":"Any additional parameters to be set in the query string (example: `wheels=cool&x=y`). Please note that CFWheels uses the `&` and `=` characters to split the parameters and encode them properly for you. However, if you need to pass in `&` or `=` as part of the value, then you need to encode them (and only them), example: `a=cats%26dogs%3Dtrouble!&b=1`.","name":"params","type":"string"},{"default":"","required":false,"hint":"Sets an anchor name to be appended to the path.","name":"anchor","type":"string"},{"required":false,"hint":"The type of `method` to use in the `form` tag (`delete`, `get`, `patch`, `post`, and `put` are the options).","name":"method","type":"string"},{"default":true,"required":false,"hint":"If `true`, returns only the relative URL (no protocol, host name or port).","name":"onlyPath","type":"boolean"},{"default":"","required":false,"hint":"Set this to override the current host.","name":"host","type":"string"},{"default":"","required":false,"hint":"Set this to override the current protocol.","name":"protocol","type":"string"},{"default":0,"required":false,"hint":"Set this to override the current port number.","name":"port","type":"numeric"},{"default":true,"required":false,"hint":"Use this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to `true` to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to `attributes` to only encode attribute values and not tag content.","name":"encode","type":"any"}],"availableIn":["controller"],"name":"buttonTo","tags":{"categoryClass":"linkfunctions","sectionClass":"viewhelpers","category":"Link Functions","section":"View Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Cache the `termsOfUse` action.\ncaches(&quot;termsOfUse&quot;);\n\n// Cache the `termsOfUse` action for 30 minutes.\ncaches(actions=&quot;browseByUser, browseByTitle&quot;, time=30);\n\n// Cache the `termsOfUse` and `codeOfConduct` actions, including their filters.\ncaches(actions=&quot;termsOfUse, codeOfConduct&quot;, static=true);\n\n// Cache content separately based on region.\ncaches(action=&quot;home&quot;, key=&quot;request.region&quot;);\n</code></pre>"},"hint":"Tells CFWheels to cache one or more actions.\r\n\r\n","returntype":"void","slug":"controller.caches","parameters":[{"default":"","required":false,"hint":"Action(s) to cache. This argument is also aliased as `actions`.","name":"action","type":"string"},{"default":60,"required":false,"hint":"Minutes to cache the action(s) for.","name":"time","type":"numeric"},{"default":false,"required":false,"hint":"Set to `true` to tell CFWheels that this is a static page and that it can skip running the controller filters (before and after filters set on actions). Please note that the `onSessionStart` and `onRequestStart` events still execute though.","name":"static","type":"boolean"},{"default":"","required":false,"hint":"List of variables to be evaluated at runtime and included in the cache key so that content can be cached separately.","name":"appendToKey","type":"string"}],"availableIn":["controller"],"name":"caches","tags":{"categoryClass":"configurationfunctions","sectionClass":"controller","category":"Configuration Functions","section":"Controller"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;!--- Capitalize a sentence, will result in &quot;Wheels is a framework&quot;---&gt;\n#capitalize(&quot;wheels is a framework&quot;)#</code></pre>"},"hint":"Capitalizes all words in the text to create a nicer looking title.\r\n\r\n","returntype":"string","slug":"controller.capitalize","parameters":[{"required":true,"name":"text","type":"string"}],"availableIn":["controller","model","test","mapper","migrator","migration","tabledefinition"],"name":"capitalize","tags":{"categoryClass":"stringfunctions","sectionClass":"globalhelpers","category":"String Functions","section":"Global Helpers"}},{"extended":{"hasExtended":false,"docs":""},"hint":"alters existing table in the database\r\n\r\n","returntype":"void","slug":"tabledefinition.change","parameters":[{"default":"false","required":false,"name":"addColumns","type":"boolean"}],"availableIn":["tabledefinition"],"name":"change","tags":{"categoryClass":"tabledefinitionfunctions","sectionClass":"migrator","category":"Table Definition Functions","section":"Migrator"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>changeColumn(table='members', columnType='string', columnName='status', limit=50);\n</code></pre>"},"hint":"changes a column definition\r\nOnly available in a migration CFC\r\n\r\n","returntype":"void","slug":"migration.changeColumn","parameters":[{"required":true,"hint":"The Name of the table where the column is","name":"table","type":"string"},{"required":true,"hint":"THe name of the column","name":"columnName","type":"string"},{"required":true,"hint":"The type of the column","name":"columnType","type":"string"},{"default":"","required":false,"hint":"The name of the column which this column should be inserted after","name":"afterColumn","type":"string"},{"default":"","required":false,"hint":"Name for reference column, see documentation for references function, required if columnType is 'reference'","name":"referenceName","type":"string"},{"required":false,"hint":"Default value for this column","name":"default","type":"string"},{"required":false,"hint":"Whether to allow NULL values","name":"null","type":"boolean"},{"required":false,"hint":"Character or integer size limit for column","name":"limit","type":"numeric"},{"required":false,"hint":"(For decimal type) the maximum number of digits allow","name":"precision","type":"numeric"},{"required":false,"hint":"(For decimal type) the number of digits to the right of the decimal point","name":"scale","type":"numeric"},{"default":"false","required":false,"hint":"if true, attempts to add columns and database will likely throw an error if column already exists","name":"addColumns","type":"boolean"}],"availableIn":["migration"],"name":"changeColumn","tags":{"categoryClass":"migrationfunctions","sectionClass":"migrator","category":"Migration Functions","section":"Migrator"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Get a member object and change the `email` property on it\nmember = model(&quot;member&quot;).findByKey(params.memberId);\nmember.email = params.newEmail;\n\n// Get the previous value (what the `email` property was before it was changed)\noldValue = member.changedFrom(&quot;email&quot;);\n\n// The above can also be done using a dynamic function like this\noldValue = member.emailChangedFrom();</code></pre>"},"hint":"Returns the previous value of a property that has changed.\r\nReturns an empty string if no previous value exists.\r\nCFWheels will keep a note of the previous property value until the object is saved to the database.\r\n\r\n","returntype":"string","slug":"model.changedFrom","parameters":[{"required":true,"hint":"Name of property to get the previous value for.","name":"property","type":"string"}],"availableIn":["model"],"name":"changedFrom","tags":{"categoryClass":"changefunctions","sectionClass":"modelobject","category":"Change Functions","section":"Model Object"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Get an object, change it, and then ask for its changes (will return a list of the property names that have changed, not the values themselves)\nmember = model(&quot;member&quot;).findByKey(params.memberId);\nmember.firstName = params.newFirstName;\nmember.email = params.newEmail;\nchangedProperties = member.changedProperties();</code></pre>"},"hint":"Returns a list of the object properties that have been changed but not yet saved to the database.\r\n\r\n","returntype":"string","slug":"model.changedProperties","parameters":[],"availableIn":["model"],"name":"changedProperties","tags":{"categoryClass":"changefunctions","sectionClass":"modelobject","category":"Change Functions","section":"Model Object"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>t = changeTable(name='employees');\nt.string(columnNames=&quot;fullName&quot;, default=&quot;&quot;, null=true, limit=&quot;255&quot;);\nt.change();\n</code></pre>"},"hint":"Creates a table definition object to store modifications to table properties\r\nOnly available in a migration CFC\r\n\r\n","returntype":"TableDefinition","slug":"migration.changeTable","parameters":[{"required":true,"hint":"Name of the table to set change properties on","name":"name","type":"string"}],"availableIn":["migration"],"name":"changeTable","tags":{"categoryClass":"migrationfunctions","sectionClass":"migrator","category":"Migration Functions","section":"Migrator"}},{"extended":{"hasExtended":false,"docs":""},"hint":"adds char columns to table definition\r\n\r\n","returntype":"any","slug":"tabledefinition.char","parameters":[{"required":false,"name":"columnNames","type":"string"},{"required":false,"name":"limit","type":"any"},{"required":false,"name":"default","type":"string"},{"required":false,"name":"null","type":"boolean"}],"availableIn":["tabledefinition"],"name":"char","tags":{"categoryClass":"tabledefinitionfunctions","sectionClass":"migrator","category":"Table Definition Functions","section":"Migrator"}},{"extended":{"hasExtended":false,"docs":""},"hint":"","returntype":"any","slug":"controller.checkAdmin","parameters":[],"availableIn":["controller"],"name":"checkAdmin","tags":{"categoryClass":"","sectionClass":"","category":"","section":""}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;!--- Basic example of a check box for a boolean field ---&gt;\n#checkBox(objectName=&quot;photo&quot;, property=&quot;isPublic&quot;, label=&quot;Display this photo publicly.&quot;)#\n\n&lt;!--- Shows check boxes for selecting public access for all photos provided by the `photos` association and nested properties ---&gt;\n&lt;cfloop from=&quot;1&quot; to=&quot;#ArrayLen(user.photos)#&quot; index=&quot;i&quot;&gt;\n    &lt;div&gt;\n        &lt;h3&gt;#user.photos[i].title#:&lt;/h3&gt;\n        &lt;div&gt;\n            #checkBox(objectName=&quot;user&quot;, association=&quot;photos&quot;, position=i, property=&quot;isPublic&quot;, label=&quot;Display this photo publicly.&quot;)#\n        &lt;/div&gt;\n    &lt;/div&gt;\n&lt;/cfloop&gt;</code></pre>"},"hint":"Builds and returns a string containing a check box form control based on the supplied name.\r\nNote: Pass any additional arguments like class, rel, and id, and the generated tag will also include those values as HTML attributes.\r\n\r\n","returntype":"string","slug":"controller.checkBox","parameters":[{"required":true,"hint":"The variable name of the object to build the form control for.","name":"objectName","type":"any"},{"required":true,"hint":"The name of the property to use in the form control.","name":"property","type":"string"},{"required":false,"hint":"The name of the association that the property is located on. Used for building nested forms that work with nested properties. If you are building a form with deep nesting, simply pass in a list to the nested object, and CFWheels will figure it out.","name":"association","type":"string"},{"required":false,"hint":"The position used when referencing a hasMany relationship in the association argument. Used for building nested forms that work with nested properties. If you are building a form with deep nestings, simply pass in a list of positions, and CFWheels will figure it out.","name":"position","type":"string"},{"default":1,"required":false,"name":"checkedValue","type":"string"},{"default":0,"required":false,"hint":"The value of the check box when it's on the unchecked state.","name":"uncheckedValue","type":"string"},{"default":"useDefaultLabel","required":false,"hint":"The label text to use in the form control.","name":"label","type":"string"},{"default":"around","required":false,"hint":"Whether to place the label before, after, or wrapped around the form control. Label text placement can be controlled using aroundLeft or aroundRight.","name":"labelPlacement","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control. Useful to wrap the form control with HTML tags.","name":"prepend","type":"string"},{"default":"","required":false,"hint":"String to append to the form control. Useful to wrap the form control with HTML tags.","name":"append","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control's label. Useful to wrap the form control with HTML tags.","name":"prependToLabel","type":"string"},{"default":"","required":false,"hint":"String to append to the form control's label. Useful to wrap the form control with HTML tags.","name":"appendToLabel","type":"string"},{"default":"span","required":false,"hint":"HTML tag to wrap the form control with when the object contains errors.","name":"errorElement","type":"string"},{"default":"field-with-errors","required":false,"hint":"The class name of the HTML tag that wraps the form control when there are errors.","name":"errorClass","type":"string"},{"default":true,"required":false,"hint":"Use this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to `true` to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to `attributes` to only encode attribute values and not tag content.","name":"encode","type":"any"}],"availableIn":["controller"],"name":"checkBox","tags":{"categoryClass":"formobjectfunctions","sectionClass":"viewhelpers","category":"Form Object Functions","section":"View Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;!--- Example 1: Basic usage involves a `label`, `name`, and `value` ---&gt;\n#checkBoxTag(name=&quot;subscribe&quot;, value=&quot;true&quot;, label=&quot;Subscribe to our newsletter&quot;, checked=false)#\n\n&lt;!--- Example 2: Loop over a query to display choices and whether or not they are checked ---&gt;\n// Controller code\npizza = model(&quot;pizza&quot;).findByKey(session.pizzaId);\nselectedToppings = pizza.toppings();\ntoppings = model(&quot;topping&quot;).findAll(order=&quot;name&quot;);\n\n&lt;!--- View code ---&gt;\n&lt;fieldset&gt;\n\t&lt;legend&gt;Toppings&lt;/legend&gt;\n\t&lt;cfoutput query=&quot;toppings&quot;&gt;\n\t\t#checkBoxTag(name=&quot;toppings&quot;, value=&quot;true&quot;, label=toppings.name, checked=YesNoFormat(ListFind(ValueList(selectedToppings.id), toppings.id))#\n\t&lt;/cfoutput&gt;\n&lt;/fieldset&gt;</code></pre>"},"hint":"Builds and returns a string containing a check box form control based on the supplied name.\r\nNote: Pass any additional arguments like <code>class</code>, <code>rel</code>, and <code>id</code>, and the generated tag will also include those values as HTML attributes.\r\n\r\n","returntype":"string","slug":"controller.checkBoxTag","parameters":[{"required":true,"hint":"Name to populate in tag's name attribute.","name":"name","type":"string"},{"default":false,"required":false,"hint":"Whether or not the check box should be checked by default.","name":"checked","type":"boolean"},{"default":1,"required":false,"hint":"Value of check box in its checked state.","name":"value","type":"string"},{"default":"","required":false,"hint":"The value of the check box when it's on the unchecked state.","name":"uncheckedValue","type":"string"},{"default":"","required":false,"hint":"The label text to use in the form control.","name":"label","type":"string"},{"default":"around","required":false,"hint":"Whether to place the label before, after, or wrapped around the form control. Label text placement can be controlled using aroundLeft or aroundRight.","name":"labelPlacement","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control. Useful to wrap the form control with HTML tags.","name":"prepend","type":"string"},{"default":"","required":false,"hint":"String to append to the form control. Useful to wrap the form control with HTML tags.","name":"append","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control's label. Useful to wrap the form control with HTML tags.","name":"prependToLabel","type":"string"},{"default":"","required":false,"hint":"String to append to the form control's label. Useful to wrap the form control with HTML tags.","name":"appendToLabel","type":"string"},{"default":true,"required":false,"hint":"Use this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to `true` to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to `attributes` to only encode attribute values and not tag content.","name":"encode","type":"any"}],"availableIn":["controller"],"name":"checkBoxTag","tags":{"categoryClass":"formtagfunctions","sectionClass":"viewhelpers","category":"Form Tag Functions","section":"View Helpers"}},{"extended":{"hasExtended":false,"docs":""},"hint":"","returntype":"any","slug":"controller.checkEmailValid","parameters":[],"availableIn":["controller"],"name":"checkEmailValid","tags":{"categoryClass":"","sectionClass":"","category":"","section":""}},{"extended":{"hasExtended":false,"docs":""},"hint":"","returntype":"any","slug":"controller.checkLogin","parameters":[],"availableIn":["controller"],"name":"checkLogin","tags":{"categoryClass":"","sectionClass":"","category":"","section":""}},{"extended":{"hasExtended":false,"docs":""},"hint":"","returntype":"any","slug":"controller.checkReports","parameters":[],"availableIn":["controller"],"name":"checkReports","tags":{"categoryClass":"","sectionClass":"","category":"","section":""}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Convert startTime to UTC (maybe done in an &quot;after find&quot; call back) but then tell CFWheels to clear the information about this change (but not the change itself) so that it won't attempt to save the new value to the database, report it as being changed when calling hasChanged() etc.\n\nthis.startTime = DateConvert(&quot;Local2UTC&quot;, this.startTime);\nthis.clearChangeInformation(property=&quot;startTime&quot;);\n\n// Clear information for all properties\nthis.clearChangeInformation();</code></pre>"},"hint":"Clears all internal knowledge of the current state of the object.\r\n\r\n","returntype":"void","slug":"model.clearChangeInformation","parameters":[{"required":false,"hint":"string false Name of property to clear information for.","name":"property","type":"string"}],"availableIn":["model"],"name":"clearChangeInformation","tags":{"categoryClass":"changefunctions","sectionClass":"modelobject","category":"Change Functions","section":"Model Object"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Clear all errors on the object as a whole\nthis.clearErrors();\n\n// Clear all errors on `firstName`\nthis.clearErrors(&quot;firstName&quot;);</code></pre>"},"hint":"Clears out all errors set on the object or only the ones set for a specific property or name.\r\n\r\n","returntype":"void","slug":"model.clearErrors","parameters":[{"default":"","required":false,"hint":"Specify a property name here if you want to clear all errors set on that property.","name":"property","type":"string"},{"default":"","required":false,"hint":"Specify an error name here if you want to clear all errors set with that error name.","name":"name","type":"string"}],"availableIn":["model"],"name":"clearErrors","tags":{"categoryClass":"errorfunctions","sectionClass":"modelobject","category":"Error Functions","section":"Model Object"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>\n&lt;cfscript&gt;\n\nmapper()\n    // Create a route like `photos/search`\n    .resources(name=&quot;photos&quot;, nested=true)\n        .collection()\n            .get(&quot;search&quot;)\n        .end()\n    .end()\n.end();\n\n&lt;/cfscript&gt;\n</code></pre>"},"hint":"A collection route doesn't require an id because it acts on a collection of objects.\r\nphotos/search is an example of a collection route, because it acts on (and displays) a collection of objects.\r\n\r\n","returntype":"struct","slug":"mapper.collection","parameters":[],"availableIn":["mapper"],"name":"collection","tags":{"categoryClass":"routing","sectionClass":"configuration","category":"Routing","section":"Configuration"}},{"extended":{"hasExtended":false,"docs":""},"hint":"Adds a column to table definition.\r\n\r\n","returntype":"any","slug":"tabledefinition.column","parameters":[{"required":true,"name":"columnName","type":"string"},{"required":true,"name":"columnType","type":"string"},{"required":false,"name":"default","type":"string"},{"required":false,"name":"null","type":"boolean"},{"required":false,"name":"limit","type":"any"},{"required":false,"name":"precision","type":"numeric"},{"required":false,"name":"scale","type":"numeric"}],"availableIn":["tabledefinition"],"name":"column","tags":{"categoryClass":"tabledefinitionfunctions","sectionClass":"migrator","category":"Table Definition Functions","section":"Migrator"}},{"extended":{"hasExtended":false,"docs":""},"hint":"Returns a struct with data for the named property.\r\n\r\n","returntype":"any","slug":"model.columnDataForProperty","parameters":[{"required":true,"hint":"Name of property to inspect.","name":"property","type":"string"}],"availableIn":["model"],"name":"columnDataForProperty","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"modelclass","category":"Miscellaneous Functions","section":"Model Class"}},{"extended":{"hasExtended":false,"docs":""},"hint":"Returns the column name mapped for the named model property.\r\n\r\n","returntype":"any","slug":"model.columnForProperty","parameters":[{"required":true,"hint":"Name of property to inspect.","name":"property","type":"string"}],"availableIn":["model"],"name":"columnForProperty","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"modelclass","category":"Miscellaneous Functions","section":"Model Class"}},{"extended":{"hasExtended":false,"docs":""},"hint":"Returns a list of column names in the table mapped to this model.\r\nThe list is ordered according to the columns' ordinal positions in the database table.\r\n\r\n","returntype":"string","slug":"model.columnNames","parameters":[],"availableIn":["model"],"name":"columnNames","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"modelclass","category":"Miscellaneous Functions","section":"Model Class"}},{"extended":{"hasExtended":false,"docs":""},"hint":"Returns an array of columns names for the table associated with this class.\r\nDoes not include calculated properties that will be generated by the CFWheels ORM.\r\n\r\n","returntype":"array","slug":"model.columns","parameters":[],"availableIn":["model"],"name":"columns","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"modelclass","category":"Miscellaneous Functions","section":"Model Class"}},{"extended":{"hasExtended":false,"docs":""},"hint":"Pass in another model object to see if the two objects are the same.\r\n\r\n","returntype":"boolean","slug":"model.compareTo","parameters":[{"required":true,"name":"object","type":"component"}],"availableIn":["model"],"name":"compareTo","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"modelobject","category":"Miscellaneous Functions","section":"Model Object"}},{"extended":{"hasExtended":false,"docs":""},"hint":"","returntype":"any","slug":"controller.confirmEmail","parameters":[{"required":false,"name":"userid","type":"numeric"}],"availableIn":["controller"],"name":"confirmEmail","tags":{"categoryClass":"","sectionClass":"","category":"","section":""}},{"extended":{"hasExtended":false,"docs":""},"hint":"Set variable patterns to use for matching.\r\n\r\n","returntype":"struct","slug":"mapper.constraints","parameters":[],"availableIn":["mapper"],"name":"constraints","tags":{"categoryClass":"routing","sectionClass":"configuration","category":"Routing","section":"Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;!--- In your view ---&gt;\n&lt;cfsavecontent variable=&quot;mySidebar&quot;&gt;\n&lt;h1&gt;My Sidebar Text&lt;/h1&gt;\n&lt;/cfsavecontent&gt;\n&lt;cfset contentFor(sidebar=mySidebar)&gt;\n\n&lt;!--- In your layout ---&gt;\n&lt;html&gt;\n\t&lt;head&gt;\n\t    &lt;title&gt;My Site&lt;/title&gt;\n\t&lt;/head&gt;\n\t&lt;body&gt;\n\t\t&lt;cfoutput&gt;\n\t\t\t#includeContent(&quot;sidebar&quot;)#\n\t\t\t#includeContent()#\n\t\t&lt;/cfoutput&gt;\n\t&lt;/body&gt;\n&lt;/html&gt;</code></pre>"},"hint":"Used to store a section's output for rendering within a layout.\r\nThis content store acts as a stack, so you can store multiple pieces of content for a given section.\r\n\r\n","returntype":"void","slug":"controller.contentFor","parameters":[{"default":"last","required":false,"hint":"The position in the section's stack where you want the content placed. Valid values are `first`, `last`, or the numeric position.","name":"position","type":"any"},{"default":"false","required":false,"hint":"Whether or not to overwrite any of the content. Valid values are `false`, `true`, or `all`.","name":"overwrite","type":"any"}],"availableIn":["controller"],"name":"contentFor","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"viewhelpers","category":"Miscellaneous Functions","section":"View Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;!--- In `views/layout.cfm` ---&gt;\n#contentForLayout()#</code></pre>"},"hint":"Includes content for the body section, which equates to the output generated by the view template run by the request.\r\n\r\n","returntype":"string","slug":"controller.contentForLayout","parameters":[],"availableIn":["controller"],"name":"contentForLayout","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"viewhelpers","category":"Miscellaneous Functions","section":"View Helpers"}},{"extended":{"hasExtended":false,"docs":""},"hint":"Considered deprecated as this doesn't conform to RESTful routing principles; Try not to use this.\r\n\r\n","returntype":"struct","slug":"mapper.controller","parameters":[{"required":true,"name":"controller","type":"string"},{"default":"[runtime expression]","required":false,"name":"name","type":"string"},{"default":"[runtime expression]","required":false,"name":"path","type":"string"}],"availableIn":["mapper"],"name":"controller","tags":{"categoryClass":"routing","sectionClass":"configuration","category":"Routing","section":"Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>testController = controller(&quot;users&quot;, params);</code></pre>"},"hint":"Creates and returns a controller object with your own custom name and params.\r\nUsed primarily for testing purposes.\r\n\r\n","returntype":"any","slug":"controller.controller","parameters":[{"required":true,"hint":"Name of the controller to create.","name":"name","type":"string"},{"default":"[runtime expression]","required":false,"hint":"The params struct (combination of form and URL variables).","name":"params","type":"struct"}],"availableIn":["controller","model","test","migrator","migration","tabledefinition"],"name":"controller","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"globalhelpers","category":"Miscellaneous Functions","section":"Global Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Count how many authors there are in the table\nauthorCount = model(&quot;author&quot;).count();\n\n// Count how many authors that have a last name starting with an &quot;A&quot;\nauthorOnACount = model(&quot;author&quot;).count(where=&quot;lastName LIKE 'A%'&quot;);\n\n// Count how many authors that have written books starting with an &quot;A&quot;\nauthorWithBooksOnACount = model(&quot;author&quot;).count(include=&quot;books&quot;, where=&quot;booktitle LIKE 'A%'&quot;);\n\n// Count the number of comments on a specific post (a `hasMany` association from `post` to `comment` is required)\n// The `commentCount` method will call `model(&quot;comment&quot;).count(where=&quot;postId=#post.id#&quot;)` internally\naPost = model(&quot;post&quot;).findByKey(params.postId);\namount = aPost.commentCount();</code></pre>"},"hint":"Returns the number of rows that match the arguments (or all rows if no arguments are passed in).\r\nUses the SQL function <code>COUNT</code>.\r\nIf no records can be found to perform the calculation on, <code>0</code> is returned.\r\n\r\n","returntype":"any","slug":"model.count","parameters":[{"default":"","required":false,"hint":"Maps to the `WHERE` clause of the query (or `HAVING` when necessary). The following operators are supported: `=`, `!=`, `<>`, `<`, `<=`, `>`, `>=`, `LIKE`, `NOT LIKE`, `IN`, `NOT IN`, `IS NULL`, `IS NOT NULL`, `AND`, and `OR` (note that the key words need to be written in upper case). You can also use parentheses to group statements. You do not need to specify the table name(s); CFWheels will do that for you.","name":"where","type":"string"},{"default":"","required":false,"hint":"Associations that should be included in the query using `INNER` or `LEFT OUTER` joins (which join type that is used depends on how the association has been set up in your model). If all included associations are set on the current model, you can specify them in a list (e.g. `department,addresses,emails`). You can build more complex include strings by using parentheses when the association is set on an included model, like `album(artist(genre))`, for example. These complex `include` strings only work when `returnAs` is set to `query` though.","name":"include","type":"string"},{"default":true,"required":false,"hint":"Set to `true` to use `cfqueryparam` on all columns, or pass in a list of property names to use `cfqueryparam` on those only.","name":"parameterize","type":"any"},{"default":"false","required":false,"hint":"Set to `true` to include soft-deleted records in the queries that this method runs.","name":"includeSoftDeletes","type":"boolean"},{"required":false,"hint":"Maps to the `GROUP BY` clause of the query. You do not need to specify the table name(s); CFWheels will do that for you.","name":"group","type":"string"}],"availableIn":["model"],"name":"count","tags":{"categoryClass":"statisticsfunctions","sectionClass":"modelclass","category":"Statistics Functions","section":"Model Class"}},{"extended":{"hasExtended":false,"docs":""},"hint":"creates the table in the database\r\n\r\n","returntype":"void","slug":"tabledefinition.create","parameters":[],"availableIn":["tabledefinition"],"name":"create","tags":{"categoryClass":"tabledefinitionfunctions","sectionClass":"migrator","category":"Table Definition Functions","section":"Migrator"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Create a new author and save it to the database\nnewAuthor = model(&quot;author&quot;).create(params.author);\n\n// Same as above using named arguments\nnewAuthor = model(&quot;author&quot;).create(firstName=&quot;John&quot;, lastName=&quot;Doe&quot;);\n\n// Same as above using both named arguments and a struct\nnewAuthor = model(&quot;author&quot;).create(active=1, properties=params.author);\n\n// If you have a `hasOne` or `hasMany` association setup from `customer` to `order`, you can do a scoped call. (The `createOrder` method below will call `model(&quot;order&quot;).create(customerId=aCustomer.id, shipping=params.shipping)` internally.)\naCustomer = model(&quot;customer&quot;).findByKey(params.customerId);\nanOrder = aCustomer.createOrder(shipping=params.shipping);</code></pre>"},"hint":"Creates a new object, saves it to the database (if the validation permits it), and returns it.\r\nIf the validation fails, the unsaved object (with errors added to it) is still returned.\r\nProperty names and values can be passed in either using named arguments or as a struct to the <code>properties</code> argument.\r\n\r\n","returntype":"any","slug":"model.create","parameters":[{"default":"[runtime expression]","required":false,"hint":"The properties you want to set on the object (can also be passed in as named arguments).","name":"properties","type":"struct"},{"default":true,"required":false,"hint":"Set to `true` to use `cfqueryparam` on all columns, or pass in a list of property names to use `cfqueryparam` on those only.","name":"parameterize","type":"any"},{"default":false,"required":false,"hint":"Set to `true` to force CFWheels to query the database even though an identical query for this model may have been run in the same request. (The default in CFWheels is to get the second query from the model's request-level cache.)","name":"reload","type":"boolean"},{"default":true,"required":false,"hint":"Set to `false` to skip validations for this operation.","name":"validate","type":"boolean"},{"default":"[runtime expression]","required":false,"hint":"Set this to `commit` to update the database, `rollback` to run all the database queries but not commit them, or `none` to skip transaction handling altogether.","name":"transaction","type":"string"},{"default":true,"required":false,"hint":"Set to `false` to disable callbacks for this method.","name":"callbacks","type":"boolean"},{"default":false,"required":false,"hint":"Set this to `true` to allow explicit assignment of `createdAt` or `updatedAt` properties","name":"allowExplicitTimestamps","type":"boolean"}],"availableIn":["model"],"name":"create","tags":{"categoryClass":"createfunctions","sectionClass":"modelclass","category":"Create Functions","section":"Model Class"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Create an empty migration file\nresult=application.wheels.migrator.createMigration(&quot;MyMigrationFile&quot;);\n\n// Or Create a migration file from the create-table template\nresult=application.wheels.migrator.createMigration(&quot;MyMigrationFile&quot;,&quot;create-table&quot;);\n</code></pre>"},"hint":"Creates a migration file. Whilst you can use this in your application, the recommended useage is via either the CLI or the provided GUI interface\r\n\r\n","returntype":"string","slug":"migrator.createMigration","parameters":[{"required":true,"name":"migrationName","type":"string"},{"default":"","required":false,"name":"templateName","type":"string"},{"default":"timestamp","required":false,"name":"migrationPrefix","type":"string"}],"availableIn":["migrator"],"name":"createMigration","tags":{"categoryClass":"generalfunctions","sectionClass":"migrator","category":"General Functions","section":"Migrator"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Example: create a users table\nt = createTable(name='users'); \n\tt.string(columnNames='firstname,lastname', default='', null=false, limit=50);\n\tt.string(columnNames='email', default='', null=false, limit=255); \n\tt.string(columnNames='passwordHash', default='', null=true, limit=500);\n\tt.string(columnNames='passwordResetToken,verificationToken', default='', null=true, limit=500);\n\tt.boolean(columnNames='passwordChangeRequired,verified', default=false); \n\tt.datetime(columnNames='passwordResetTokenAt,passwordResetAt,loggedinAt', default='', null=true); \n\tt.integer(columnNames='roleid', default=0, null=false, limit=3);\n\tt.timestamps();\nt.create();\n\n// Example: Create a table with a different Primary Key\nt = createTable(name='tokens', id=false);\n\tt.primaryKey(name='id', null=false, type=&quot;string&quot;, limit=35 );\n\tt.datetime(columnNames=&quot;expiresAt&quot;, null=false);\n\tt.integer(columnNames='requests', default=0, null=false);\n\tt.timestamps();\nt.create();\n\n// Example: Create a Join Table with composite primary keys\nt = createTable(name='userkintins', id=false); \n\tt.primaryKey(name=&quot;userid&quot;, null=false, limit=11);\n\tt.primaryKey(name='profileid', type=&quot;string&quot;, limit=11 );  \nt.create();\n</code></pre>"},"hint":"Creates a table definition object to store table properties\r\nOnly available in a migration CFC\r\n\r\n","returntype":"TableDefinition","slug":"migration.createTable","parameters":[{"required":true,"hint":"The name of the table to create","name":"name","type":"string"},{"default":"false","required":false,"hint":"whether to drop the table before creating it","name":"force","type":"boolean"},{"default":"true","required":false,"hint":"Whether to create a default primarykey or not","name":"id","type":"boolean"},{"default":"id","required":false,"hint":"Name of the primary key field to create","name":"primaryKey","type":"string"}],"availableIn":["migration"],"name":"createTable","tags":{"categoryClass":"migrationfunctions","sectionClass":"migrator","category":"Migration Functions","section":"Migrator"}},{"extended":{"hasExtended":false,"docs":""},"hint":"Creates a view definition object to store view properties\r\nOnly available in a migration CFC\r\n\r\n","returntype":"ViewDefinition","slug":"migration.createView","parameters":[{"required":true,"hint":"Name of the view to change properties on","name":"name","type":"string"}],"availableIn":["migration"],"name":"createView","tags":{"categoryClass":"migrationfunctions","sectionClass":"migrator","category":"Migration Functions","section":"Migrator"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;head&gt;\n  #csrfMetaTags()#\n&lt;/head&gt;</code></pre>"},"hint":"Include this in your layouts' <code>head</code> sections to include meta tags containing the authenticity token for use by JavaScript AJAX requests needing to <code>POST</code> data to your application.\r\n\r\n","returntype":"string","slug":"controller.csrfMetaTags","parameters":[{"default":true,"required":false,"hint":"Use this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to `true` to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to `attributes` to only encode attribute values and not tag content.","name":"encode","type":"boolean"}],"availableIn":["controller"],"name":"csrfMetaTags","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"viewhelpers","category":"Miscellaneous Functions","section":"View Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;!--- Alternating table row colors ---&gt;\n&lt;table&gt;\n\t&lt;thead&gt;\n\t\t&lt;tr&gt;\n\t\t\t&lt;th&gt;Name&lt;/th&gt;\n\t\t\t&lt;th&gt;Phone&lt;/th&gt;\n\t\t&lt;/tr&gt;\n\t&lt;/thead&gt;\n\t&lt;tbody&gt;\n\t\t&lt;cfoutput query=&quot;employees&quot;&gt;\n\t\t\t&lt;tr class=&quot;#cycle(&quot;odd,even&quot;)#&quot;&gt;\n\t\t\t\t&lt;td&gt;#employees.name#&lt;/td&gt;\n\t\t\t\t&lt;td&gt;#employees.phone#&lt;/td&gt;\n\t\t\t&lt;/tr&gt;\n\t\t&lt;/cfoutput&gt;\n\t&lt;/tbody&gt;\n&lt;/table&gt;\n\n&lt;!--- Alternating row colors and shrinking emphasis ---&gt;\n&lt;cfoutput query=&quot;employees&quot; group=&quot;departmentId&quot;&gt;\n\t&lt;div class=&quot;#cycle(values=&quot;even,odd&quot;, name=&quot;row&quot;)#&quot;&gt;\n\t\t&lt;ul&gt;\n\t\t\t&lt;cfoutput&gt;\n\t\t\t\trank = cycle(values=&quot;president,vice-president,director,manager,specialist,intern&quot;, name=&quot;position&quot;)&gt;\n\t\t\t\t&lt;li class=&quot;#rank#&quot;&gt;#categories.categoryName#&lt;/li&gt;\n\t\t\t\tresetCycle(&quot;emphasis&quot;)&gt;\n\t\t\t&lt;/cfoutput&gt;\n\t\t&lt;/ul&gt;\n\t&lt;/div&gt;\n&lt;/cfoutput&gt;</code></pre>"},"hint":"Cycles through list values every time it is called.\r\n\r\n","returntype":"string","slug":"controller.cycle","parameters":[{"required":true,"hint":"List of values to cycle through.","name":"values","type":"string"},{"default":"default","required":false,"hint":"Name to give the cycle. Useful when you use multiple cycles on a page.","name":"name","type":"string"}],"availableIn":["controller"],"name":"cycle","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"viewhelpers","category":"Miscellaneous Functions","section":"View Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// In models/User.cfc.\nconfig() {\n\t// Tell Wheels to use the data source named `users_source` instead of the default one whenever this model makes SQL calls.\n\tdataSource(&quot;users_source&quot;);\n}</code></pre>"},"hint":"Use this method to override the data source connection information for this model.\r\n\r\n","returntype":"void","slug":"model.dataSource","parameters":[{"required":true,"hint":"The data source name to connect to.","name":"datasource","type":"string"},{"default":"","required":false,"hint":"The username for the data source.","name":"username","type":"string"},{"default":"","required":false,"hint":"The password for the data source.","name":"password","type":"string"}],"availableIn":["model"],"name":"dataSource","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"modelconfiguration","category":"Miscellaneous Functions","section":"Model Configuration"}},{"extended":{"hasExtended":false,"docs":""},"hint":"Adds date columns to table definition.\r\n\r\n","returntype":"any","slug":"tabledefinition.date","parameters":[{"required":false,"name":"columnNames","type":"string"},{"required":false,"name":"default","type":"string"},{"required":false,"name":"null","type":"boolean"}],"availableIn":["tabledefinition"],"name":"date","tags":{"categoryClass":"tabledefinitionfunctions","sectionClass":"migrator","category":"Table Definition Functions","section":"Migrator"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;!--- View code ---&gt;\n#dateSelect(objectName=&quot;user&quot;, property=&quot;dateOfBirth&quot;)#\n\n&lt;!--- Show fields to select month and year ---&gt;\n#dateSelect(objectName=&quot;order&quot;, property=&quot;expirationDate&quot;, order=&quot;month,year&quot;)#</code></pre>"},"hint":"Builds and returns a string containing three <code>select</code> form controls for month, day, and year based on the supplied <code>objectName</code> and <code>property</code>.\r\n\r\n","returntype":"string","slug":"controller.dateSelect","parameters":[{"default":"","required":false,"hint":"The variable name of the object to build the form control for.","name":"objectName","type":"any"},{"default":"","required":false,"hint":"The name of the property to use in the form control.","name":"property","type":"string"},{"required":false,"hint":"The name of the association that the property is located on. Used for building nested forms that work with nested properties. If you are building a form with deep nesting, simply pass in a list to the nested object, and CFWheels will figure it out.","name":"association","type":"string"},{"required":false,"hint":"The position used when referencing a `hasMany` relationship in the association argument. Used for building nested forms that work with nested properties. If you are building a form with deep nestings, simply pass in a list of positions, and CFWheels will figure it out.","name":"position","type":"string"},{"default":"month,day,year","required":false,"hint":"Use to change the order of or exclude date `select` tags.","name":"order","type":"string"},{"default":" ","required":false,"name":"separator","type":"string"},{"default":2021,"required":false,"hint":"First year in `select` list.","name":"startYear","type":"numeric"},{"default":2031,"required":false,"hint":"Last year in `select` list.","name":"endYear","type":"numeric"},{"default":"names","required":false,"hint":"Pass in names, numbers, or abbreviations to control display.","name":"monthDisplay","type":"string"},{"default":"January,February,March,April,May,June,July,August,September,October,November,December","required":false,"name":"monthNames","type":"string"},{"default":"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec","required":false,"name":"monthAbbreviations","type":"string"},{"default":false,"required":false,"hint":"Whether to include a blank option in the `select` form control. Pass `true` to include a blank line or a string that should represent what display text should appear for the empty value (for example, \"- Select One -\").","name":"includeBlank","type":"any"},{"default":false,"required":false,"hint":"The label text to use in the form control.","name":"label","type":"string"},{"default":"around","required":false,"hint":"Whether to place the label before, after, or wrapped around the form control. Label text placement can be controlled using `aroundLeft` or `aroundRight`.","name":"labelPlacement","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control. Useful to wrap the form control with HTML tags.","name":"prepend","type":"string"},{"default":"","required":false,"hint":"String to append to the form control. Useful to wrap the form control with HTML tags.","name":"append","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control's label. Useful to wrap the form control with HTML tags.","name":"prependToLabel","type":"string"},{"default":"","required":false,"hint":"String to append to the form control's label. Useful to wrap the form control with HTML tags.","name":"appendToLabel","type":"string"},{"default":"span","required":false,"hint":"HTML tag to wrap the form control with when the object contains errors.","name":"errorElement","type":"string"},{"default":"field-with-errors","required":false,"hint":"The `class` name of the HTML tag that wraps the form control when there are errors.","name":"errorClass","type":"string"},{"required":false,"hint":"Set to false to not combine the select parts into a single DateTime object.","name":"combine","type":"boolean"},{"default":true,"required":false,"hint":"Use this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to `true` to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to `attributes` to only encode attribute values and not tag content.","name":"encode","type":"any"}],"availableIn":["controller"],"name":"dateSelect","tags":{"categoryClass":"formobjectfunctions","sectionClass":"viewhelpers","category":"Form Object Functions","section":"View Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;!--- This &quot;Tag&quot; version of function accepts `name` and `selected` instead of binding to a model object ---&gt;\n#dateSelectTags(name=&quot;dateStart&quot;, selected=params.dateStart)#\n\n&lt;!--- Show fields for month and year only ---&gt;\n#dateSelectTags(name=&quot;expiration&quot;, selected=params.expiration, order=&quot;month,year&quot;)#</code></pre>"},"hint":"Builds and returns a string containing three <code>select</code> form controls (month, day, and year) based on a name and value.\r\n\r\n","returntype":"string","slug":"controller.dateSelectTags","parameters":[{"required":true,"hint":"Name to populate in tag's name attribute.","name":"name","type":"string"},{"default":"","required":false,"hint":"Value of option that should be selected by default.","name":"selected","type":"string"},{"default":"month,day,year","required":false,"hint":"Use to change the order of or exclude date `select` tags.","name":"order","type":"string"},{"default":" ","required":false,"hint":"[see:dateSelect].","name":"separator","type":"string"},{"default":2021,"required":false,"hint":"First year in `select` list.","name":"startYear","type":"numeric"},{"default":2031,"required":false,"hint":"Last year in `select` list.","name":"endYear","type":"numeric"},{"default":"names","required":false,"hint":"Pass in names, numbers, or abbreviations to control display.","name":"monthDisplay","type":"string"},{"default":"January,February,March,April,May,June,July,August,September,October,November,December","required":false,"hint":"[see:dateSelect].","name":"monthNames","type":"string"},{"default":"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec","required":false,"hint":"[see:dateSelect].","name":"monthAbbreviations","type":"string"},{"default":false,"required":false,"hint":"Whether to include a blank option in the select form control. Pass true to include a blank line or a string that should represent what display text should appear for the empty value (for example, \"- Select One -\").","name":"includeBlank","type":"any"},{"default":"","required":false,"hint":"The label text to use in the form control.","name":"label","type":"string"},{"default":"around","required":false,"hint":"Whether to place the label before, after, or wrapped around the form control. Label text placement can be controlled using aroundLeft or aroundRight.","name":"labelPlacement","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control. Useful to wrap the form control with HTML tags.","name":"prepend","type":"string"},{"default":"","required":false,"hint":"String to append to the form control. Useful to wrap the form control with HTML tags.","name":"append","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control's label. Useful to wrap the form control with HTML tags.","name":"prependToLabel","type":"string"},{"default":"","required":false,"hint":"String to append to the form control's label. Useful to wrap the form control with HTML tags.","name":"appendToLabel","type":"string"},{"required":false,"hint":"Set to false to not combine the select parts into a single DateTime object.","name":"combine","type":"boolean"},{"default":true,"required":false,"hint":"Use this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to `true` to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to `attributes` to only encode attribute values and not tag content.","name":"encode","type":"any"},{"default":"[runtime expression]","required":false,"name":"$now","type":"date"}],"availableIn":["controller"],"name":"dateSelectTags","tags":{"categoryClass":"formtagfunctions","sectionClass":"viewhelpers","category":"Form Tag Functions","section":"View Helpers"}},{"extended":{"hasExtended":false,"docs":""},"hint":"adds datetime columns to table definition\r\n\r\n","returntype":"any","slug":"tabledefinition.datetime","parameters":[{"required":false,"name":"columnNames","type":"string"},{"required":false,"name":"default","type":"string"},{"required":false,"name":"null","type":"boolean"}],"availableIn":["tabledefinition"],"name":"datetime","tags":{"categoryClass":"tabledefinitionfunctions","sectionClass":"migrator","category":"Table Definition Functions","section":"Migrator"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;!--- View code ---&gt;\n#dateTimeSelect(objectName=&quot;article&quot;, property=&quot;publishedAt&quot;)#\n\n&lt;!--- Show fields for month, day, hour, and minute ---&gt;\n#dateTimeSelect(objectName=&quot;appointment&quot;, property=&quot;dateTimeStart&quot;, dateOrder=&quot;month,day&quot;, timeOrder=&quot;hour,minute&quot;)#</code></pre>"},"hint":"Builds and returns a string containing six <code>select</code> form controls (three for date selection and the remaining three for time selection) based on the supplied objectName and property.\r\n\r\n","returntype":"string","slug":"controller.dateTimeSelect","parameters":[{"required":true,"hint":"The variable name of the object to build the form control for.","name":"objectName","type":"string"},{"required":true,"hint":"The name of the property to use in the form control.","name":"property","type":"string"},{"required":false,"hint":"The name of the association that the property is located on. Used for building nested forms that work with nested properties. If you are building a form with deep nesting, simply pass in a list to the nested object, and Wheels will figure it out.","name":"association","type":"string"},{"required":false,"hint":"The position used when referencing a hasMany relationship in the association argument. Used for building nested forms that work with nested properties. If you are building a form with deep nestings, simply pass in a list of positions, and Wheels will figure it out.","name":"position","type":"string"},{"default":"month,day,year","required":false,"hint":"Use to change the order of or exclude date select tags.","name":"dateOrder","type":"string"},{"default":" ","required":false,"name":"dateSeparator","type":"string"},{"default":2021,"required":false,"hint":"Last year in select list.","name":"startYear","type":"numeric"},{"default":2031,"required":false,"name":"endYear","type":"numeric"},{"default":"names","required":false,"hint":"Pass in names, numbers, or abbreviations to control display.","name":"monthDisplay","type":"string"},{"default":"January,February,March,April,May,June,July,August,September,October,November,December","required":false,"name":"monthNames","type":"string"},{"default":"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec","required":false,"name":"monthAbbreviations","type":"string"},{"default":"hour,minute,second","required":false,"hint":"Use to change the order of or exclude time select tags.","name":"timeOrder","type":"string"},{"default":":","required":false,"hint":"Use to change the character that is displayed between the time select tags.","name":"timeSeparator","type":"string"},{"default":1,"required":false,"hint":"Pass in 10 to only show minute 10, 20, 30, etc.","name":"minuteStep","type":"numeric"},{"default":1,"required":false,"hint":"Pass in 10 to only show seconds 10, 20, 30, etc","name":"secondStep","type":"numeric"},{"default":" - ","required":false,"hint":"Use to change the character that is displayed between the first and second set of select tags.","name":"separator","type":"string"},{"default":false,"required":false,"hint":"Whether to include a blank option in the select form control. Pass true to include a blank line or a string that should represent what display text should appear for the empty value (for example, \"- Select One -\").","name":"includeBlank","type":"any"},{"default":false,"required":false,"hint":"The label text to use in the form control.","name":"label","type":"string"},{"default":"around","required":false,"hint":"Whether to place the label before, after, or wrapped around the form control. Label text placement can be controlled using aroundLeft or aroundRight.","name":"labelPlacement","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control. Useful to wrap the form control with HTML tags.","name":"prepend","type":"string"},{"default":"","required":false,"hint":"String to append to the form control. Useful to wrap the form control with HTML tags.","name":"append","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control's label. Useful to wrap the form control with HTML tags.","name":"prependToLabel","type":"string"},{"default":"","required":false,"hint":"String to append to the form control's label. Useful to wrap the form control with HTML tags.","name":"appendToLabel","type":"string"},{"default":"span","required":false,"hint":"HTML tag to wrap the form control with when the object contains errors.","name":"errorElement","type":"string"},{"default":"field-with-errors","required":false,"hint":"The class name of the HTML tag that wraps the form control when there are errors.","name":"errorClass","type":"string"},{"required":false,"hint":"Set to false to not combine the select parts into a single DateTime object.","name":"combine","type":"boolean"},{"default":false,"required":false,"hint":"Whether to display the hours in 24 or 12 hour format. 12 hour format has AM/PM drop downs","name":"twelveHour","type":"boolean"},{"default":true,"required":false,"hint":"Use this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to `true` to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to `attributes` to only encode attribute values and not tag content.","name":"encode","type":"any"}],"availableIn":["controller"],"name":"dateTimeSelect","tags":{"categoryClass":"formobjectfunctions","sectionClass":"viewhelpers","category":"Form Object Functions","section":"View Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;!--- This &quot;Tag&quot; version of the function accepts a `name` and `selected` instead of binding to a model object---&gt;\n#dateTimeSelectTags(name=&quot;dateTimeStart&quot;, selected=params.dateTimeStart)#\n\n&lt;!--- Show fields for month, day, hour, and minute---&gt;\n#dateTimeSelectTags(name=&quot;dateTimeStart&quot;, selected=params.dateTimeStart, dateOrder=&quot;month,day&quot;, timeOrder=&quot;hour,minute&quot;)#</code></pre>"},"hint":"Builds and returns a string containing six <code>select</code> form controls (three for date selection and the remaining three for time selection) based on a name.\r\n\r\n","returntype":"string","slug":"controller.dateTimeSelectTags","parameters":[{"required":true,"hint":"Name to populate in tag's name attribute.","name":"name","type":"string"},{"default":"","required":false,"hint":"Value of option that should be selected by default.","name":"selected","type":"string"},{"default":"month,day,year","required":false,"hint":"Use to change the order of or exclude date select tags.","name":"dateOrder","type":"string"},{"default":" ","required":false,"hint":"[see:dateTimeSelect].","name":"dateSeparator","type":"string"},{"default":2021,"required":false,"hint":"First year in `select` list.","name":"startYear","type":"numeric"},{"default":2031,"required":false,"hint":"Last year in `select` list.","name":"endYear","type":"numeric"},{"default":"names","required":false,"hint":"Pass in names, numbers, or abbreviations to control display.","name":"monthDisplay","type":"string"},{"default":"January,February,March,April,May,June,July,August,September,October,November,December","required":false,"hint":"[see:dateSelect].","name":"monthNames","type":"string"},{"default":"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec","required":false,"hint":"[see:dateSelect].","name":"monthAbbreviations","type":"string"},{"default":"hour,minute,second","required":false,"hint":"Use to change the order of or exclude time select tags.","name":"timeOrder","type":"string"},{"default":":","required":false,"hint":"Use to change the character that is displayed between the time select tags.","name":"timeSeparator","type":"string"},{"default":1,"required":false,"hint":"Pass in 10 to only show minute 10, 20, 30, etc.","name":"minuteStep","type":"numeric"},{"default":1,"required":false,"hint":"Pass in 10 to only show seconds 10, 20, 30, etc.","name":"secondStep","type":"numeric"},{"default":" - ","required":false,"hint":"Use to change the character that is displayed between the first and second set of select tags.","name":"separator","type":"string"},{"default":false,"required":false,"hint":"Whether to include a blank option in the select form control. Pass true to include a blank line or a string that should represent what display text should appear for the empty value (for example, \"- Select One -\").","name":"includeBlank","type":"any"},{"default":"","required":false,"hint":"The label text to use in the form control.","name":"label","type":"string"},{"default":"around","required":false,"hint":"Whether to place the label before, after, or wrapped around the form control. Label text placement can be controlled using aroundLeft or aroundRight.","name":"labelPlacement","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control. Useful to wrap the form control with HTML tags.","name":"prepend","type":"string"},{"default":"","required":false,"hint":"String to append to the form control. Useful to wrap the form control with HTML tags.","name":"append","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control's label. Useful to wrap the form control with HTML tags.","name":"prependToLabel","type":"string"},{"default":"","required":false,"hint":"String to append to the form control's label. Useful to wrap the form control with HTML tags.","name":"appendToLabel","type":"string"},{"required":false,"hint":"Set to false to not combine the select parts into a single DateTime object.","name":"combine","type":"boolean"},{"default":false,"required":false,"hint":"whether to display the hours in 24 or 12 hour format. 12 hour format has AM/PM drop downs","name":"twelveHour","type":"boolean"},{"default":true,"required":false,"hint":"Use this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to `true` to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to `attributes` to only encode attribute values and not tag content.","name":"encode","type":"any"}],"availableIn":["controller"],"name":"dateTimeSelectTags","tags":{"categoryClass":"formtagfunctions","sectionClass":"viewhelpers","category":"Form Tag Functions","section":"View Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;!--- This &quot;Tag&quot; version of the function accepts a `name` and `selected` instead of binding to a model object ---&gt;\n#daySelectTag(name=&quot;dayOfWeek&quot;, selected=params.dayOfWeek)#</code></pre>"},"hint":"Builds and returns a string containing a <code>select</code> form control for the days of the week based on the supplied name.\r\n\r\n","returntype":"string","slug":"controller.daySelectTag","parameters":[{"required":true,"hint":"Name to populate in tag's name attribute.","name":"name","type":"string"},{"default":"","required":false,"hint":"The day that should be selected initially.","name":"selected","type":"string"},{"default":false,"required":false,"hint":"Whether to include a blank option in the select form control. Pass true to include a blank line or a string that should represent what display text should appear for the empty value (for example, \"- Select One -\").","name":"includeBlank","type":"any"},{"default":"","required":false,"hint":"The label text to use in the form control.","name":"label","type":"string"},{"default":"around","required":false,"hint":"Whether to place the label before, after, or wrapped around the form control. Label text placement can be controlled using aroundLeft or aroundRight.","name":"labelPlacement","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control. Useful to wrap the form control with HTML tags.","name":"prepend","type":"string"},{"default":"","required":false,"hint":"String to append to the form control. Useful to wrap the form control with HTML tags.","name":"append","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control's label. Useful to wrap the form control with HTML tags.","name":"prependToLabel","type":"string"},{"default":"","required":false,"hint":"String to append to the form control's label. Useful to wrap the form control with HTML tags.","name":"appendToLabel","type":"string"},{"default":true,"required":false,"hint":"Use this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to `true` to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to `attributes` to only encode attribute values and not tag content.","name":"encode","type":"any"},{"default":"[runtime expression]","required":false,"name":"$now","type":"date"}],"availableIn":["controller"],"name":"daySelectTag","tags":{"categoryClass":"formtagfunctions","sectionClass":"viewhelpers","category":"Form Tag Functions","section":"View Helpers"}},{"extended":{"hasExtended":false,"docs":""},"hint":"Used to examine an expression\r\nAny overloaded arguments get passed to cfdump's attributeCollection\r\n\r\n","returntype":"any","slug":"test.debug","parameters":[{"required":true,"hint":"The expression to examine","name":"expression","type":"string"},{"default":true,"required":false,"hint":"Whether to display the debug call. False returns without outputting anything into the buffer. Good when you want to leave the debug command in the test for later purposes, but don't want it to display","name":"display","type":"boolean"}],"availableIn":["test"],"name":"debug","tags":{"categoryClass":"testingfunctions","sectionClass":"testmodel","category":"Testing Functions","section":"Test Model"}},{"extended":{"hasExtended":false,"docs":""},"hint":"adds decimal columns to table definition\r\n\r\n","returntype":"any","slug":"tabledefinition.decimal","parameters":[{"required":false,"name":"columnNames","type":"string"},{"required":false,"name":"default","type":"string"},{"required":false,"name":"null","type":"boolean"},{"required":false,"name":"precision","type":"numeric"},{"required":false,"name":"scale","type":"numeric"}],"availableIn":["tabledefinition"],"name":"decimal","tags":{"categoryClass":"tabledefinitionfunctions","sectionClass":"migrator","category":"Table Definition Functions","section":"Migrator"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;cfscript&gt;\n\nmapper()\n    // Route name:  articleReview\n    // Example URL: /articles/987/reviews/12542\n    // Controller:  Reviews\n    // Action:      delete\n    .delete(name=&quot;articleReview&quot;, pattern=&quot;articles/[articleKey]/reviews/[key]&quot;, to=&quot;reviews##delete&quot;)\n\n    // Route name:  cookedBooks\n    // Example URL: /cooked-books\n    // Controller:  CookedBooks\n    // Action:      delete\n    .delete(name=&quot;cookedBooks&quot;, controller=&quot;cookedBooks&quot;, action=&quot;delete&quot;)\n\n    // Route name:  logout\n    // Example URL: /logout\n    // Controller:  Sessions\n    // Action:      delete\n    .delete(name=&quot;logout&quot;, to=&quot;sessions##delete&quot;)\n\n    // Route name:  clientsStatus\n    // Example URL: /statuses/4918\n    // Controller:  clients.Statuses\n    // Action:      delete\n    .delete(name=&quot;statuses&quot;, to=&quot;statuses##delete&quot;, package=&quot;clients&quot;)\n\n    // Route name:  blogComment\n    // Example URL: /comments/5432\n    // Controller:  blog.Comments\n    // Action:      delete\n    .delete(\n        name=&quot;comment&quot;,\n        pattern=&quot;comments/[key]&quot;,\n        to=&quot;comments##delete&quot;,\n        package=&quot;blog&quot;\n    )\n.end();\n\n&lt;/cfscript&gt;\n</code></pre>"},"hint":"Create a route that matches a URL requiring an HTTP <code>DELETE</code> method. We recommend using this matcher to expose actions that delete database records.\r\n\r\n","returntype":"struct","slug":"mapper.delete","parameters":[{"required":false,"hint":"Camel-case name of route to reference when build links and form actions (e.g., `blogPost`).","name":"name","type":"string"},{"required":false,"hint":"Overrides the URL pattern that will match the route. The default value is a dasherized version of `name` (e.g., a `name` of `blogPost` generates a pattern of `blog-post`).","name":"pattern","type":"string"},{"required":false,"hint":"Set `controller##action` combination to map the route to. You may use either this argument or a combination of `controller` and `action`.","name":"to","type":"string"},{"required":false,"hint":"Map the route to a given controller. This must be passed along with the `action` argument.","name":"controller","type":"string"},{"required":false,"hint":"Map the route to a given action within the `controller`. This must be passed along with the `controller` argument.","name":"action","type":"string"},{"required":false,"hint":"Indicates a subfolder that the controller will be referenced from (but not added to the URL pattern). For example, if you set this to `admin`, the controller will be located at `admin/YourController.cfc`, but the URL path will not contain `admin/`.","name":"package","type":"string"},{"required":false,"hint":"If this route is within a nested resource, you can set this argument to `member` or `collection`. A `member` route contains a reference to the resource's `key`, while a `collection` route does not.","name":"on","type":"string"},{"required":false,"hint":"Redirect via 302 to this URL when this route is matched. Has precedence over controller/action. Use either an absolute link like `/about/`, or a full canonical link.","name":"redirect","type":"string"}],"availableIn":["mapper"],"name":"delete","tags":{"categoryClass":"routing","sectionClass":"configuration","category":"Routing","section":"Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Get a post object and then delete it from the database.\npost = model(&quot;post&quot;).findByKey(33);\npost.delete();\n\n// If you have a `hasMany` association setup from `post` to `comment`, you can do a scoped call. (The `deleteComment` method below will call `comment.delete()` internally.)\npost = model(&quot;post&quot;).findByKey(params.postId);\ncomment = model(&quot;comment&quot;).findByKey(params.commentId);\npost.deleteComment(comment);</code></pre>"},"hint":"Deletes the object, which means the row is deleted from the database (unless prevented by a <code>beforeDelete</code> callback).\r\nReturns <code>true</code> on successful deletion of the row, <code>false</code> otherwise.\r\n\r\n","returntype":"boolean","slug":"model.delete","parameters":[{"default":true,"required":false,"hint":"Set to `true` to use `cfqueryparam` on all columns, or pass in a list of property names to use `cfqueryparam` on those only.","name":"parameterize","type":"any"},{"default":"[runtime expression]","required":false,"hint":"Set this to `commit` to update the database, `rollback` to run all the database queries but not commit them, or `none` to skip transaction handling altogether.","name":"transaction","type":"string"},{"default":true,"required":false,"hint":"Set to `false` to disable callbacks for this method.","name":"callbacks","type":"boolean"},{"default":false,"required":false,"hint":"Set to `true` to include soft-deleted records in the queries that this method runs.","name":"includeSoftDeletes","type":"boolean"},{"default":true,"required":false,"hint":"Set to `false` to permanently delete a record, even if it has a soft delete column.","name":"softDelete","type":"boolean"}],"availableIn":["model"],"name":"delete","tags":{"categoryClass":"crudfunctions","sectionClass":"modelobject","category":"CRUD Functions","section":"Model Object"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Delete all inactive users without instantiating them (will skip validation and callbacks).\nrecordsDeleted = model(&quot;user&quot;).deleteAll(where=&quot;inactive=1&quot;, instantiate=false);\n\n// If you have a `hasMany` association setup from `post` to `comment`, you can do a scoped call. (The `deleteAllComments` method below will call `model(&quot;comment&quot;).deleteAll(where=&quot;postId=#post.id#&quot;)` internally.)\npost = model(&quot;post&quot;).findByKey(params.postId);\nhowManyDeleted = post.deleteAllComments();\n</code></pre>"},"hint":"Deletes all records that match the <code>where</code> argument.\r\nBy default, objects will not be instantiated and therefore callbacks and validations are not invoked.\r\nYou can change this behavior by passing in <code>instantiate=true</code>.\r\nReturns the number of records that were deleted.\r\n\r\n","returntype":"numeric","slug":"model.deleteAll","parameters":[{"default":"","required":false,"hint":"Maps to the `WHERE` clause of the query (or `HAVING` when necessary). The following operators are supported: `=`, `!=`, `<>`, `<`, `<=`, `>`, `>=`, `LIKE`, `NOT LIKE`, `IN`, `NOT IN`, `IS NULL`, `IS NOT NULL`, `AND`, and `OR` (note that the key words need to be written in upper case). You can also use parentheses to group statements. You do not need to specify the table name(s); CFWheels will do that for you.","name":"where","type":"string"},{"default":"","required":false,"hint":"Associations that should be included in the query using `INNER` or `LEFT OUTER` joins (which join type that is used depends on how the association has been set up in your model). If all included associations are set on the current model, you can specify them in a list (e.g. `department,addresses,emails`). You can build more complex include strings by using parentheses when the association is set on an included model, like `album(artist(genre))`, for example. These complex `include` strings only work when `returnAs` is set to `query` though.","name":"include","type":"string"},{"default":false,"required":false,"hint":"Set to `true` to force CFWheels to query the database even though an identical query for this model may have been run in the same request. (The default in CFWheels is to get the second query from the model's request-level cache.)","name":"reload","type":"boolean"},{"default":true,"required":false,"hint":"Set to `true` to use `cfqueryparam` on all columns, or pass in a list of property names to use `cfqueryparam` on those only.","name":"parameterize","type":"any"},{"default":false,"required":false,"hint":"Whether or not to instantiate the object(s) first. When objects are not instantiated, any callbacks and validations set on them will be skipped.","name":"instantiate","type":"boolean"},{"default":"[runtime expression]","required":false,"hint":"Set this to `commit` to update the database, `rollback` to run all the database queries but not commit them, or `none` to skip transaction handling altogether.","name":"transaction","type":"string"},{"default":true,"required":false,"hint":"Set to `false` to disable callbacks for this method.","name":"callbacks","type":"boolean"},{"default":false,"required":false,"hint":"Set to `true` to include soft-deleted records in the queries that this method runs.","name":"includeSoftDeletes","type":"boolean"},{"default":true,"required":false,"hint":"Set to `false` to permanently delete a record, even if it has a soft delete column.","name":"softDelete","type":"boolean"}],"availableIn":["model"],"name":"deleteAll","tags":{"categoryClass":"deletefunctions","sectionClass":"modelclass","category":"Delete Functions","section":"Model Class"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Delete the user with the primary key value of `1`.\nresult = model(&quot;user&quot;).deleteByKey(1);\n</code></pre>"},"hint":"Finds the record with the supplied key and deletes it.\r\nReturns <code>true</code> on successful deletion of the row, <code>false</code> otherwise.\r\n\r\n","returntype":"boolean","slug":"model.deleteByKey","parameters":[{"required":true,"hint":"Primary key value(s) of the record to fetch. Separate with comma if passing in multiple primary key values. Accepts a string, list, or a numeric value.","name":"key","type":"any"},{"default":false,"required":false,"hint":"Set to `true` to force CFWheels to query the database even though an identical query for this model may have been run in the same request. (The default in CFWheels is to get the second query from the model's request-level cache.)","name":"reload","type":"boolean"},{"default":"[runtime expression]","required":false,"hint":"Set this to `commit` to update the database, `rollback` to run all the database queries but not commit them, or `none` to skip transaction handling altogether.","name":"transaction","type":"string"},{"default":true,"required":false,"hint":"Set to `false` to disable callbacks for this method.","name":"callbacks","type":"boolean"},{"default":false,"required":false,"hint":"Set to `true` to include soft-deleted records in the queries that this method runs.","name":"includeSoftDeletes","type":"boolean"},{"default":true,"required":false,"hint":"Set to `false` to permanently delete a record, even if it has a soft delete column.","name":"softDelete","type":"boolean"}],"availableIn":["model"],"name":"deleteByKey","tags":{"categoryClass":"deletefunctions","sectionClass":"modelclass","category":"Delete Functions","section":"Model Class"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Delete the user that signed up last.\nresult = model(&quot;user&quot;).deleteOne(order=&quot;signupDate DESC&quot;);\n\n// If you have a `hasOne` association setup from `user` to `profile` you can do a scoped call (the `deleteProfile` method below will call `model(&quot;profile&quot;).deleteOne(where=&quot;userId=#aUser.id#&quot;)` internally).\naUser = model(&quot;user&quot;).findByKey(params.userId);\naUser.deleteProfile();\n</code></pre>"},"hint":"Gets an object based on conditions and deletes it.\r\n\r\n","returntype":"boolean","slug":"model.deleteOne","parameters":[{"default":"","required":false,"hint":"Maps to the `WHERE` clause of the query (or `HAVING` when necessary). The following operators are supported: `=`, `!=`, `<>`, `<`, `<=`, `>`, `>=`, `LIKE`, `NOT LIKE`, `IN`, `NOT IN`, `IS NULL`, `IS NOT NULL`, `AND`, and `OR` (note that the key words need to be written in upper case). You can also use parentheses to group statements. You do not need to specify the table name(s); CFWheels will do that for you.","name":"where","type":"string"},{"default":"","required":false,"hint":"Maps to the `ORDER` BY clause of the query. You do not need to specify the table name(s); CFWheels will do that for you.","name":"order","type":"string"},{"default":false,"required":false,"hint":"Set to `true` to force CFWheels to query the database even though an identical query for this model may have been run in the same request. (The default in CFWheels is to get the second query from the model's request-level cache.)","name":"reload","type":"boolean"},{"default":"[runtime expression]","required":false,"hint":"Set this to `commit` to update the database, `rollback` to run all the database queries but not commit them, or `none` to skip transaction handling altogether.","name":"transaction","type":"string"},{"default":true,"required":false,"hint":"Set to `false` to disable callbacks for this method.","name":"callbacks","type":"boolean"},{"default":false,"required":false,"hint":"Set to `true` to include soft-deleted records in the queries that this method runs.","name":"includeSoftDeletes","type":"boolean"},{"default":true,"required":false,"hint":"Set to `false` to permanently delete a record, even if it has a soft delete column.","name":"softDelete","type":"boolean"}],"availableIn":["model"],"name":"deleteOne","tags":{"categoryClass":"deletefunctions","sectionClass":"modelclass","category":"Delete Functions","section":"Model Class"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Get the original value from an obfuscated one\noriginalValue = deobfuscateParam(&quot;b7ab9a50&quot;);</code></pre>"},"hint":"Deobfuscates a value.\r\n\r\n","returntype":"string","slug":"controller.deobfuscateParam","parameters":[{"required":true,"hint":"The value to deobfuscate.","name":"param","type":"string"}],"availableIn":["controller","model","test","migrator","migration","tabledefinition"],"name":"deobfuscateParam","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"globalhelpers","category":"Miscellaneous Functions","section":"Global Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Controller code.\nrightNow = Now();\naWhileAgo = DateAdd(&quot;d&quot;, -30, rightNow);\n\n// View code.\n&lt;!--- Will output: about 1 month ---&gt;\n#distanceOfTimeInWords(aWhileAgo, rightNow)#\n</code></pre>"},"hint":"Pass in two dates to this method, and it will return a string describing the difference between them.\r\n\r\n","returntype":"string","slug":"controller.distanceOfTimeInWords","parameters":[{"required":true,"hint":"Date to compare from.","name":"fromTime","type":"date"},{"required":true,"hint":"Date to compare to.","name":"toTime","type":"date"},{"default":false,"required":false,"hint":"Whether or not to include the number of seconds in the returned string.","name":"includeSeconds","type":"boolean"}],"availableIn":["controller","model","test","migrator","migration","tabledefinition"],"name":"distanceOfTimeInWords","tags":{"categoryClass":"datefunctions","sectionClass":"globalhelpers","category":"Date Functions","section":"Global Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>function down() {\n\ttransaction {\n\t\ttry {\n\t\t\t// your code goes here\n\t\t\tdropTable('myTable');\n\t\t} catch (any e) {\n\t\t\tlocal.exception = e;\n\t\t}\n\n\t\tif (StructKeyExists(local, &quot;exception&quot;)) {\n\t\t\ttransaction action=&quot;rollback&quot;;\n\t\t\tthrow(errorCode=&quot;1&quot;, detail=local.exception.detail, message=local.exception.message, type=&quot;any&quot;);\n\t\t} else {\n\t\t\ttransaction action=&quot;commit&quot;;\n\t\t}\n\t}\n}\n</code></pre>"},"hint":"Migrates down: will be executed when migrating your schema backward\r\nAlong with up(), these are the two main functions in any migration file\r\nOnly available in a migration CFC\r\n\r\n","returntype":"void","slug":"migration.down","parameters":[],"availableIn":["migration"],"name":"down","tags":{"categoryClass":"migrationfunctions","sectionClass":"migrator","category":"Migration Functions","section":"Migrator"}},{"extended":{"hasExtended":false,"docs":""},"hint":"Drops a foreign key constraint from the database\r\nOnly available in a migration CFC\r\n\r\n","returntype":"void","slug":"migration.dropForeignKey","parameters":[{"required":true,"hint":"The table name to perform the operation on","name":"table","type":"string"},{"required":true,"hint":"the name of the key to drop","name":"keyName","type":"string"}],"availableIn":["migration"],"name":"dropForeignKey","tags":{"categoryClass":"migrationfunctions","sectionClass":"migrator","category":"Migration Functions","section":"Migrator"}},{"extended":{"hasExtended":false,"docs":""},"hint":"Drop a foreign key constraint from the database, using the reference name that was used to create it\r\nOnly available in a migration CFC\r\n\r\n","returntype":"void","slug":"migration.dropReference","parameters":[{"required":true,"hint":"The table name to perform the operation on","name":"table","type":"string"},{"required":true,"hint":"the name of the reference to drop","name":"referenceName","type":"string"}],"availableIn":["migration"],"name":"dropReference","tags":{"categoryClass":"migrationfunctions","sectionClass":"migrator","category":"Migration Functions","section":"Migrator"}},{"extended":{"hasExtended":false,"docs":""},"hint":"Drops a table from the database\r\nOnly available in a migration CFC\r\n\r\n","returntype":"void","slug":"migration.dropTable","parameters":[{"required":true,"hint":"Name of the table to drop","name":"name","type":"string"}],"availableIn":["migration"],"name":"dropTable","tags":{"categoryClass":"migrationfunctions","sectionClass":"migrator","category":"Migration Functions","section":"Migrator"}},{"extended":{"hasExtended":false,"docs":""},"hint":"drops a view from the database\r\nOnly available in a migration CFC\r\n\r\n","returntype":"void","slug":"migration.dropView","parameters":[{"required":true,"hint":"Name of the view to drop","name":"name","type":"string"}],"availableIn":["migration"],"name":"dropView","tags":{"categoryClass":"migrationfunctions","sectionClass":"migrator","category":"Migration Functions","section":"Migrator"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;cfscript&gt;\n\nmapper()\n    .namespace(&quot;admin&quot;)\n        .resources(&quot;products&quot;)\n    .end() // Ends the `namespace` block.\n\n    .scope(package=&quot;public&quot;)\n        .resources(name=&quot;products&quot;, nested=true)\n          .resources(&quot;variations&quot;)\n        .end() // Ends the nested `resources` block.\n    .end() // Ends the `scope` block.\n.end(); // Ends the `mapper` block.\n\n&lt;/cfscript&gt;</code></pre>"},"hint":"Call this to end a nested routing block or the entire route configuration. This method is chained on a sequence of routing mapper method calls started by <code>mapper()</code>.\r\n\r\n","returntype":"struct","slug":"mapper.end","parameters":[],"availableIn":["mapper"],"name":"end","tags":{"categoryClass":"routing","sectionClass":"configuration","category":"Routing","section":"Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;!--- view code ---&gt;\n#startFormTag(action=&quot;create&quot;)#\n   &lt;!---  your form controls ---&gt;\n#endFormTag()#\n</code></pre>"},"hint":"Builds and returns a string containing the closing <code>form</code> tag.\r\n\r\n","returntype":"string","slug":"controller.endFormTag","parameters":[{"default":"","required":false,"hint":"String to prepend to the form control. Useful to wrap the form control with HTML tags.","name":"prepend","type":"string"},{"default":"","required":false,"hint":"String to append to the form control. Useful to wrap the form control with HTML tags.","name":"append","type":"string"},{"default":true,"required":false,"hint":"Use this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to `true` to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to `attributes` to only encode attribute values and not tag content.","name":"encode","type":"any"}],"availableIn":["controller"],"name":"endFormTag","tags":{"categoryClass":"generalformfunctions","sectionClass":"viewhelpers","category":"General Form Functions","section":"View Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Check how many errors are set on the object\nif(author.errorCount() GTE 10){\n    // Do something to deal with this very erroneous author here...\n}\n\n// Check how many errors are associated with the `email` property\nif(author.errorCount(&quot;email&quot;) gt 0){\n    // Do something to deal with this erroneous author here...\n}</code></pre>"},"hint":"Returns the number of errors this object has associated with it.\r\nSpecify property or name if you wish to count only specific errors.\r\n\r\n","returntype":"numeric","slug":"model.errorCount","parameters":[{"default":"","required":false,"hint":"Specify a property name here if you want to count only errors set on a specific property.","name":"property","type":"string"},{"default":"","required":false,"hint":"Specify an error name here if you want to count only errors set with a specific error name.","name":"name","type":"string"}],"availableIn":["model"],"name":"errorCount","tags":{"categoryClass":"errorfunctions","sectionClass":"modelobject","category":"Error Functions","section":"Model Object"}},{"extended":{"hasExtended":false,"docs":""},"hint":"Returns the error message, if one exists, on the object's property.\r\nIf multiple error messages exist, the first one is returned.\r\n\r\n","returntype":"string","slug":"controller.errorMessageOn","parameters":[{"required":true,"hint":"The variable name of the object to display the error message for.","name":"objectName","type":"string"},{"required":true,"hint":"The name of the property to display the error message for.","name":"property","type":"string"},{"default":"","required":false,"hint":"String to prepend to the error message.","name":"prependText","type":"string"},{"default":"","required":false,"hint":"String to append to the error message.","name":"appendText","type":"string"},{"default":"span","required":false,"hint":"HTML element to wrap the error message in.","name":"wrapperElement","type":"string"},{"default":"error-message","required":false,"hint":"CSS `class` to set on the wrapper element.","name":"class","type":"string"},{"default":true,"required":false,"hint":"Use this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to `true` to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to `attributes` to only encode attribute values and not tag content.","name":"encode","type":"boolean"}],"availableIn":["controller"],"name":"errorMessageOn","tags":{"categoryClass":"errorfunctions","sectionClass":"viewhelpers","category":"Error Functions","section":"View Helpers"}},{"extended":{"hasExtended":false,"docs":""},"hint":"Builds and returns a list (<code>ul</code> tag with a default <code>class</code> of <code>error-messages</code>) containing all the error messages for all the properties of the object.\r\nReturns an empty string if no errors exist.\r\n\r\n","returntype":"string","slug":"controller.errorMessagesFor","parameters":[{"required":true,"hint":"The variable name of the object to display error messages for.","name":"objectName","type":"string"},{"default":"error-messages","required":false,"hint":"CSS `class` to set on the `ul` element.","name":"class","type":"string"},{"default":true,"required":false,"hint":"Whether or not to show duplicate error messages.","name":"showDuplicates","type":"boolean"},{"default":true,"required":false,"hint":"Use this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to `true` to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to `attributes` to only encode attribute values and not tag content.","name":"encode","type":"boolean"},{"default":true,"required":false,"name":"includeAssociations","type":"boolean"}],"availableIn":["controller"],"name":"errorMessagesFor","tags":{"categoryClass":"errorfunctions","sectionClass":"viewhelpers","category":"Error Functions","section":"View Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Get all errors related to the email address of the user object\nerrors = user.errorsOn(&quot;emailAddress&quot;);</code></pre>"},"hint":"Returns an array of all errors associated with the supplied property (and error name if passed in).\r\n\r\n","returntype":"array","slug":"model.errorsOn","parameters":[{"required":true,"hint":"Specify the property name to return errors for here.","name":"property","type":"string"},{"default":"","required":false,"hint":"If you want to return only errors on the property set with a specific error name you can specify it here.","name":"name","type":"string"}],"availableIn":["model"],"name":"errorsOn","tags":{"categoryClass":"errorfunctions","sectionClass":"modelobject","category":"Error Functions","section":"Model Object"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Get all general type errors for the user object\nerrors = user.errorsOnBase();</code></pre>"},"hint":"Returns an array of all errors associated with the object as a whole (not related to any specific property).\r\n\r\n","returntype":"array","slug":"model.errorsOnBase","parameters":[{"default":"","required":false,"hint":"Specify an error name here to only return errors for that error name.","name":"name","type":"string"}],"availableIn":["model"],"name":"errorsOnBase","tags":{"categoryClass":"errorfunctions","sectionClass":"modelobject","category":"Error Functions","section":"Model Object"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;!--- Will output: ... MVC framework for ... ---&gt;\n#excerpt(text=&quot;CFWheels is a Rails-like MVC framework for Adobe ColdFusion and Lucee&quot;, phrase=&quot;framework&quot;, radius=5)#</code></pre>"},"hint":"Extracts an excerpt from text that matches the first instance of a given phrase.\r\n\r\n","returntype":"string","slug":"controller.excerpt","parameters":[{"required":true,"hint":"The text to extract an excerpt from.","name":"text","type":"string"},{"required":true,"hint":"The phrase to extract.","name":"phrase","type":"string"},{"default":100,"required":false,"hint":"Number of characters to extract surrounding the phrase.","name":"radius","type":"numeric"},{"default":"...","required":false,"hint":"String to replace first and / or last characters with.","name":"excerptString","type":"string"}],"availableIn":["controller","model","test","migrator","migration","tabledefinition"],"name":"excerpt","tags":{"categoryClass":"stringfunctions","sectionClass":"globalhelpers","category":"String Functions","section":"Global Helpers"}},{"extended":{"hasExtended":false,"docs":""},"hint":"Executes a raw sql query\r\nOnly available in a migration CFC\r\n\r\n","returntype":"void","slug":"migration.execute","parameters":[{"required":true,"hint":"Arbitary SQL String","name":"sql","type":"string"}],"availableIn":["migration"],"name":"execute","tags":{"categoryClass":"migrationfunctions","sectionClass":"migrator","category":"Migration Functions","section":"Migrator"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Checking if Joe exists in the database\nresult = model(&quot;user&quot;).exists(where=&quot;firstName = 'Joe'&quot;);\n\n// Checking if a specific user exists based on a primary key valued passed in through the URL/form in an if statement\nif (model(&quot;user&quot;).exists(keyparams.key))\n{\n\t// Do something\n}\n\n// If you have a `belongsTo` association setup from `comment` to `post`, you can do a scoped call. (The `hasPost` method below will call `model(&quot;post&quot;).exists(comment.postId)` internally.)\ncomment = model(&quot;comment&quot;).findByKey(params.commentId);\ncommentHasAPost = comment.hasPost();\n\n// If you have a `hasOne` association setup from `user` to `profile`, you can do a scoped call. (The `hasProfile` method below will call `model(&quot;profile&quot;).exists(where=&quot;userId=#user.id#&quot;)` internally.)\nuser = model(&quot;user&quot;).findByKey(params.userId);\nuserHasProfile = user.hasProfile();\n\n// If you have a `hasMany` association setup from `post` to `comment`, you can do a scoped call. (The `hasComments` method below will call `model(&quot;comment&quot;).exists(where=&quot;postid=#post.id#&quot;)` internally.)\npost = model(&quot;post&quot;).findByKey(params.postId);\npostHasComments = post.hasComments();</code></pre>"},"hint":"Checks if a record exists in the table.\r\nYou can pass in either a primary key value to the <code>key</code> argument or a string to the <code>where</code> argument.\r\nIf you don't pass in either of those, it will simply check if any record exists in the table.\r\n\r\n","returntype":"boolean","slug":"model.exists","parameters":[{"required":false,"hint":"Primary key value(s) of the record. Separate with comma if passing in multiple primary key values. Accepts a string, list, or a numeric value.","name":"key","type":"any"},{"required":false,"hint":"Maps to the `WHERE` clause of the query (or `HAVING` when necessary). The following operators are supported: `=`, `!=`, `<>`, `<`, `<=`, `>`, `>=`, `LIKE`, `NOT LIKE`, `IN`, `NOT IN`, `IS NULL`, `IS NOT NULL`, `AND`, and `OR` (note that the key words need to be written in upper case). You can also use parentheses to group statements. You do not need to specify the table name(s); CFWheels will do that for you.","name":"where","type":"string"},{"default":false,"required":false,"hint":"Set to `true` to force CFWheels to query the database even though an identical query for this model may have been run in the same request. (The default in CFWheels is to get the second query from the model's request-level cache.)","name":"reload","type":"boolean"},{"default":true,"required":false,"hint":"Set to `true` to use `cfqueryparam` on all columns, or pass in a list of property names to use `cfqueryparam` on those only.","name":"parameterize","type":"any"},{"required":false,"hint":"Set to `true` to include soft-deleted records in the queries that this method runs.","name":"includeSoftDeletes","type":"boolean"}],"availableIn":["model"],"name":"exists","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"modelclass","category":"Miscellaneous Functions","section":"Model Class"}},{"extended":{"hasExtended":false,"docs":""},"hint":"","returntype":"void","slug":"test.fail","parameters":[{"default":"","required":false,"name":"message","type":"string"}],"availableIn":["test"],"name":"fail","tags":{"categoryClass":"","sectionClass":"","category":"","section":""}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;!--- Provide a `label` and the required `objectName` and `property` ---&gt;\n#fileField(label=&quot;Photo&quot;, objectName=&quot;photo&quot;, property=&quot;imageFile&quot;)#\n\n\n&lt;!--- Display fields for photos provided by the `screenshots` association and nested properties ---&gt;\n&lt;fieldset&gt;\n\t&lt;legend&gt;Screenshots&lt;/legend&gt;\n\t&lt;cfloop from=&quot;1&quot; to=&quot;#ArrayLen(site.screenshots)#&quot; index=&quot;i&quot;&gt;\n\t\t#fileField(label=&quot;File ##i#&quot;, objectName=&quot;site&quot;, association=&quot;screenshots&quot;, position=i, property=&quot;file&quot;)#\n\t\t#textField(label=&quot;Caption ##i#&quot;, objectName=&quot;site&quot;, association=&quot;screenshots&quot;, position=i, property=&quot;caption&quot;)#\n\t&lt;/cfloop&gt;\n&lt;/fieldset&gt;\n</code></pre>"},"hint":"Builds and returns a string containing a file field form control based on the supplied objectName and property.\r\nNote: Pass any additional arguments like class, rel, and id, and the generated tag will also include those values as HTML attributes.\r\n\r\n","returntype":"string","slug":"controller.fileField","parameters":[{"required":true,"hint":"The variable name of the object to build the form control for.","name":"objectName","type":"any"},{"required":true,"hint":"The name of the property to use in the form control.","name":"property","type":"string"},{"required":false,"hint":"The name of the association that the property is located on. Used for building nested forms that work with nested properties. If you are building a form with deep nesting, simply pass in a list to the nested object, and CFWheels will figure it out.","name":"association","type":"string"},{"required":false,"hint":"The position used when referencing a hasMany relationship in the association argument. Used for building nested forms that work with nested properties. If you are building a form with deep nestings, simply pass in a list of positions, and CFWheels will figure it out.","name":"position","type":"string"},{"default":"useDefaultLabel","required":false,"hint":"The label text to use in the form control.","name":"label","type":"string"},{"default":"around","required":false,"hint":"Whether to place the label before, after, or wrapped around the form control. Label text placement can be controlled using aroundLeft or aroundRight.","name":"labelPlacement","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control. Useful to wrap the form control with HTML tags.","name":"prepend","type":"string"},{"default":"","required":false,"hint":"String to append to the form control. Useful to wrap the form control with HTML tags.","name":"append","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control's label. Useful to wrap the form control with HTML tags.","name":"prependToLabel","type":"string"},{"default":"","required":false,"hint":"String to append to the form control's label. Useful to wrap the form control with HTML tags.","name":"appendToLabel","type":"string"},{"default":"span","required":false,"hint":"HTML tag to wrap the form control with when the object contains errors.","name":"errorElement","type":"string"},{"default":"field-with-errors","required":false,"hint":"The class name of the HTML tag that wraps the form control when there are errors.","name":"errorClass","type":"string"},{"default":true,"required":false,"hint":"Use this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to `true` to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to `attributes` to only encode attribute values and not tag content.","name":"encode","type":"any"}],"availableIn":["controller"],"name":"fileField","tags":{"categoryClass":"formobjectfunctions","sectionClass":"viewhelpers","category":"Form Object Functions","section":"View Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;!---  Basic usage usually involves a `label`, `name`, and `value` ---&gt;\n#fileFieldTag(label=&quot;Photo&quot;, name=&quot;photo&quot;, value=params.photo)#</code></pre>"},"hint":"Builds and returns a string containing a file form control based on the supplied name.\r\nNote: Pass any additional arguments like <code>class</code>, <code>rel</code>, and <code>id</code>, and the generated tag will also include those values as HTML attributes.\r\n\r\n","returntype":"string","slug":"controller.fileFieldTag","parameters":[{"required":true,"hint":"Name to populate in tag's name attribute.","name":"name","type":"string"},{"default":"","required":false,"hint":"The label text to use in the form control.","name":"label","type":"string"},{"default":"around","required":false,"hint":"Whether to place the label before, after, or wrapped around the form control. Label text placement can be controlled using aroundLeft or aroundRight.","name":"labelPlacement","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control. Useful to wrap the form control with HTML tags.","name":"prepend","type":"string"},{"default":"","required":false,"hint":"String to append to the form control. Useful to wrap the form control with HTML tags.","name":"append","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control's label. Useful to wrap the form control with HTML tags.","name":"prependToLabel","type":"string"},{"default":"","required":false,"hint":"String to append to the form control's label. Useful to wrap the form control with HTML tags.","name":"appendToLabel","type":"string"},{"default":true,"required":false,"hint":"Use this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to `true` to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to `attributes` to only encode attribute values and not tag content.","name":"encode","type":"any"}],"availableIn":["controller"],"name":"fileFieldTag","tags":{"categoryClass":"formtagfunctions","sectionClass":"viewhelpers","category":"Form Tag Functions","section":"View Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Get filter chain.\nmyFilterChain = filterChain();\n\n// Get filter chain for after filters only.\nmyFilterChain = filterChain(type=&quot;after&quot;);\n</code></pre>"},"hint":"Returns an array of all the filters set on current controller in the order in which they will be executed.\r\n\r\n","returntype":"array","slug":"controller.filterChain","parameters":[{"default":"all","required":false,"hint":"Use this argument to return only before or after filters.","name":"type","type":"string"}],"availableIn":["controller"],"name":"filterChain","tags":{"categoryClass":"configurationfunctions","sectionClass":"controller","category":"Configuration Functions","section":"Controller"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Always execute `restrictAccess` before all actions in this controller.\nfilters(&quot;restrictAccess&quot;);\n\n// Always execute `isLoggedIn` and `checkIPAddress` (in that order) before all actions in this controller, except the `home` and `login` actions.\nfilters(through=&quot;isLoggedIn, checkIPAddress&quot;, except=&quot;home, login&quot;);\n</code></pre>"},"hint":"Tells CFWheels to run a function before an action is run or after an action has been run.\r\n\r\n","returntype":"void","slug":"controller.filters","parameters":[{"required":true,"hint":"Function(s) to execute before or after the action(s).","name":"through","type":"string"},{"default":"before","required":false,"hint":"Whether to run the function(s) before or after the action(s).","name":"type","type":"string"},{"default":"","required":false,"hint":"Pass in a list of action names (or one action name) to tell CFWheels that the filter function(s) should only be run on these actions.","name":"only","type":"string"},{"default":"","required":false,"hint":"Pass in a list of action names (or one action name) to tell CFWheels that the filter function(s) should be run on all actions except the specified ones.","name":"except","type":"string"},{"default":"append","required":false,"hint":"Pass in `prepend` to prepend the function(s) to the filter chain instead of appending.","name":"placement","type":"string"}],"availableIn":["controller"],"name":"filters","tags":{"categoryClass":"configurationfunctions","sectionClass":"controller","category":"Configuration Functions","section":"Controller"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Getting only 5 users and ordering them randomly\nfiveRandomUsers = model(&quot;user&quot;).findAll(maxRows=5, order=&quot;random&quot;);\n\n// Including an association (which in this case needs to be setup as a `belongsTo` association to `author` on the `article` model first)\narticles = model(&quot;article&quot;).findAll( include=&quot;author&quot;, where=&quot;published=1&quot;, order=&quot;createdAt DESC&quot; );\n\n// Similar to the above but using the association in the opposite direction (which needs to be setup as a `hasMany` association to `article` on the `author` model)  bobsArticles = model(&quot;author&quot;).findAll( include=&quot;articles&quot;, where=&quot;firstName='Bob'&quot; );\n\n// Using pagination (getting records 26-50 in this case) and a more complex way to include associations (a song `belongsTo` an album, which in turn `belongsTo` an artist)  songs = model(&quot;song&quot;).findAll( include=&quot;album(artist)&quot;, page=2, perPage=25 );\n\n// Using a dynamic finder to get all books released a certain year. Same as calling model(&quot;book&quot;).findOne(where=&quot;releaseYear=#params.year#&quot;)\nbooks = model(&quot;book&quot;).findAllByReleaseYear(params.year);\n\n// Getting all books of a certain type from a specific year by using a dynamic finder. Same as calling  model(&quot;book&quot;).findAll( where=&quot;releaseYear=#params.year# AND type='#params.type#'&quot; )\nbooks = model(&quot;book&quot;).findAllByReleaseYearAndType( &quot;#params.year#,#params.type#&quot; );\n\n// If you have a `hasMany` association setup from `post` to `comment`, you can do a scoped call. (The `comments` method below will call `model(&quot;comment&quot;).findAll(where=&quot;postId=#post.id#&quot;)` internally)\npost = model(&quot;post&quot;).findByKey(params.postId);\ncomments = post.comments();\n\n// If you have an `Order` model with properties for `productId`, `amount` and a calculated property named `totalAmount` (set up as `property(name=&quot;totalAmount&quot;, sql=&quot;SUM(amount)&quot;)`), then you can do the following to get the ids for all products with over $1,000 in sales (the SQL will be created using `HAVING` instead of `WHERE` in this case since you're getting an aggregate value for a calculated property)\nids = model(&quot;order&quot;).findAll(group=&quot;productId&quot;, where=&quot;totalAmount &gt; 1000&quot;);\n\n// Using index hints\nindexes = {\n\tauthor=&quot;idx_authors_123&quot;,\n\tpost=&quot;idx_posts_123&quot;\n}\nposts = model(&quot;author&quot;).findAll(where=&quot;firstname LIKE '#params.q#%' OR subject LIKE '#params.q#%'&quot;, include=&quot;posts&quot;, useIndex=indexes);\n</code></pre>"},"hint":"Returns records from the database table mapped to this model according to the arguments passed in (use the <code>where</code> argument to decide which records to get, use the <code>order</code> argument to set the order in which those records should be returned, and so on).\r\nThe records will be returned as either a <code>cfquery</code> result set, an array of objects, or an array of structs (depending on what the <code>returnAs</code> argument is set to).\r\n\r\n","returntype":"any","slug":"model.findAll","parameters":[{"default":"","required":false,"hint":"Maps to the `WHERE` clause of the query (or `HAVING` when necessary). The following operators are supported: `=`, `!=`, `<>`, `<`, `<=`, `>`, `>=`, `LIKE`, `NOT LIKE`, `IN`, `NOT IN`, `IS NULL`, `IS NOT NULL`, `AND`, and `OR` (note that the key words need to be written in upper case). You can also use parentheses to group statements. You do not need to specify the table name(s); CFWheels will do that for you.","name":"where","type":"string"},{"default":"","required":false,"hint":"Maps to the `ORDER` BY clause of the query. You do not need to specify the table name(s); CFWheels will do that for you.","name":"order","type":"string"},{"default":"","required":false,"hint":"Maps to the `GROUP BY` clause of the query. You do not need to specify the table name(s); CFWheels will do that for you.","name":"group","type":"string"},{"default":"","required":false,"hint":"Determines how the `SELECT` clause for the query used to return data will look. You can pass in a list of the properties (which map to columns) that you want returned from your table(s). If you don't set this argument at all, CFWheels will select all properties from your table(s). If you specify a table name (e.g. `users.email`) or alias a column (e.g. `fn AS firstName`) in the list, then the entire list will be passed through unchanged and used in the `SELECT` clause of the query. By default, all column names in tables joined via the `include` argument will be prepended with the singular version of the included table name.","name":"select","type":"string"},{"default":"false","required":false,"hint":"Whether to add the `DISTINCT` keyword to your `SELECT` clause. CFWheels will, when necessary, add this automatically (when using pagination and a `hasMany` association is used in the `include` argument, to name one example).","name":"distinct","type":"boolean"},{"default":"","required":false,"hint":"Associations that should be included in the query using `INNER` or `LEFT OUTER` joins (which join type that is used depends on how the association has been set up in your model). If all included associations are set on the current model, you can specify them in a list (e.g. `department,addresses,emails`). You can build more complex include strings by using parentheses when the association is set on an included model, like `album(artist(genre))`, for example. These complex `include` strings only work when `returnAs` is set to `query` though.","name":"include","type":"string"},{"default":"-1","required":false,"hint":"Maximum number of records to retrieve. Passed on to the `maxRows` `cfquery` attribute. The default, `-1`, means that all records will be retrieved.","name":"maxRows","type":"numeric"},{"default":"0","required":false,"hint":"If you want to paginate records, you can do so by specifying a page number here. For example, getting records 11-20 would be page number 2 when `perPage` is kept at the default setting (10 records per page). The default, 0, means that records won't be paginated and that the `perPage` and `count` arguments will be ignored.","name":"page","type":"numeric"},{"default":10,"required":false,"hint":"When using pagination, you can specify how many records you want to fetch per page here. This argument is only used when the `page` argument has been passed in.","name":"perPage","type":"numeric"},{"default":"0","required":false,"hint":"When using pagination and you know in advance how many records you want to paginate through, you can pass in that value here. Doing so will prevent CFWheels from running a `COUNT` query to get this value. This argument is only used when the `page` argument has been passed in.","name":"count","type":"numeric"},{"default":"query","required":false,"hint":"Handle to use for the query. This is used when you're paginating multiple queries and need to reference them individually in the `paginationLinks()` function. It's also used to set the name of the query in the debug output (which otherwise defaults to `userFindAllQuery` for example).","name":"handle","type":"string"},{"default":"","required":false,"hint":"If you want to cache the query, you can do so by specifying the number of minutes you want to cache the query for here. If you set it to `true`, the default cache time will be used (60 minutes).","name":"cache","type":"any"},{"default":false,"required":false,"hint":"Set to `true` to force CFWheels to query the database even though an identical query for this model may have been run in the same request. (The default in CFWheels is to get the second query from the model's request-level cache.)","name":"reload","type":"boolean"},{"default":true,"required":false,"hint":"Set to `true` to use `cfqueryparam` on all columns, or pass in a list of property names to use `cfqueryparam` on those only.","name":"parameterize","type":"any"},{"default":"query","required":false,"hint":"Set to `objects` to return an array of objects, set to `structs` to return an array of structs, set to `query` to return a query result set, or set to 'sql' to return the executed SQL query as a string.","name":"returnAs","type":"string"},{"default":true,"required":false,"hint":"When `returnAs` is set to `objects`, you can set this argument to `false` to prevent returning objects fetched from associations specified in the `include` argument. This is useful when you only need to include associations for use in the `WHERE` clause only and want to avoid the performance hit that comes with object creation.","name":"returnIncluded","type":"boolean"},{"default":"true","required":false,"hint":"Set to `false` to disable callbacks for this method.","name":"callbacks","type":"boolean"},{"default":"false","required":false,"hint":"Set to `true` to include soft-deleted records in the queries that this method runs.","name":"includeSoftDeletes","type":"boolean"},{"default":"[runtime expression]","required":false,"hint":"If you want to specify table index hints, pass in a structure of index names using your model names as the structure keys. Eg: `{user=\"idx_users\", post=\"idx_posts\"}`. This feature is only supported by MySQL and SQL Server.","name":"useIndex","type":"struct"},{"default":"[runtime expression]","required":false,"hint":"Override the default datasource","name":"dataSource","type":"string"},{"default":"0","required":false,"name":"$limit","type":"numeric"},{"default":"0","required":false,"name":"$offset","type":"numeric"}],"availableIn":["model"],"name":"findAll","tags":{"categoryClass":"readfunctions","sectionClass":"modelclass","category":"Read Functions","section":"Model Class"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// basic usage\nprimaryKeyList = model(&quot;artist&quot;).findAllKeys();\n\n// Quote values, use a different delimiter and filter results with the &quot;where&quot; argument\nprimaryKeyList = model(&quot;artist&quot;).findAllKeys(quoted=true, delimiter=&quot;-&quot;, where=&quot;active=1&quot;);</code></pre>"},"hint":"Returns all primary key values in a list.\r\nIn addition to <code>quoted</code> and <code>delimiter</code> you can pass in any argument that <code>findAll()</code> accepts.\r\n\r\n","returntype":"string","slug":"model.findAllKeys","parameters":[{"default":"false","required":false,"hint":"Set to `true` to enclose each value in single-quotation marks.","name":"quoted","type":"boolean"},{"default":",","required":false,"hint":"The delimiter character to separate the list items with.","name":"delimiter","type":"string"}],"availableIn":["model"],"name":"findAllKeys","tags":{"categoryClass":"readfunctions","sectionClass":"modelclass","category":"Read Functions","section":"Model Class"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Getting the author with the primary key value `99` as an object\nauth = model(&quot;author&quot;).findByKey(99);\n\n// Getting an author based on a form/URL value and then checking if it was found\nauth = model(&quot;author&quot;).findByKey(params.key);\nif(!isObject(auth)){\n    flashInsert(message=&quot;Author #params.key# was not found&quot;);\n    redirectTo(back=true);\n}\n\n// If you have a `belongsTo` association setup from `comment` to `post`, you can do a scoped call. (The `post` method below will call `model(&quot;post&quot;).findByKey(comment.postId)` internally)\ncomment = model(&quot;comment&quot;).findByKey(params.commentId);\npost = comment.post();</code></pre>"},"hint":"Fetches the requested record by primary key and returns it as an object.\r\nReturns <code>false</code> if no record is found.\r\nYou can override this behavior to return a <code>cfquery</code> result set instead, similar to what's described in the documentation for <code>findOne()</code>.\r\n\r\n","returntype":"any","slug":"model.findByKey","parameters":[{"required":true,"hint":"Primary key value(s) of the record. Separate with comma if passing in multiple primary key values. Accepts a string, list, or a numeric value.","name":"key","type":"any"},{"default":"","required":false,"hint":"Determines how the `SELECT` clause for the query used to return data will look. You can pass in a list of the properties (which map to columns) that you want returned from your table(s). If you don't set this argument at all, CFWheels will select all properties from your table(s). If you specify a table name (e.g. `users.email`) or alias a column (e.g. `fn AS firstName`) in the list, then the entire list will be passed through unchanged and used in the `SELECT` clause of the query. By default, all column names in tables joined via the `include` argument will be prepended with the singular version of the included table name.","name":"select","type":"string"},{"default":"","required":false,"hint":"Associations that should be included in the query using `INNER` or `LEFT OUTER` joins (which join type that is used depends on how the association has been set up in your model). If all included associations are set on the current model, you can specify them in a list (e.g. `department,addresses,emails`). You can build more complex include strings by using parentheses when the association is set on an included model, like `album(artist(genre))`, for example. These complex `include` strings only work when `returnAs` is set to `query` though.","name":"include","type":"string"},{"default":"query","required":false,"hint":"Handle to use for the query. This is used to set the name of the query in the debug output (which otherwise defaults to `userFindOneQuery` for example).","name":"handle","type":"string"},{"default":"","required":false,"hint":"If you want to cache the query, you can do so by specifying the number of minutes you want to cache the query for here. If you set it to `true`, the default cache time will be used (60 minutes).","name":"cache","type":"any"},{"default":false,"required":false,"hint":"Set to `true` to force CFWheels to query the database even though an identical query for this model may have been run in the same request. (The default in CFWheels is to get the second query from the model's request-level cache.)","name":"reload","type":"boolean"},{"default":true,"required":false,"hint":"Set to `true` to use `cfqueryparam` on all columns, or pass in a list of property names to use `cfqueryparam` on those only.","name":"parameterize","type":"any"},{"default":"object","required":false,"hint":"Set to `objects` to return an array of objects, set to `structs` to return an array of structs, set to `query` to return a query result set, or set to 'sql' to return the executed SQL query as a string.","name":"returnAs","type":"string"},{"default":"true","required":false,"hint":"Set to `false` to disable callbacks for this method.","name":"callbacks","type":"boolean"},{"default":"false","required":false,"hint":"Set to `true` to include soft-deleted records in the queries that this method runs.","name":"includeSoftDeletes","type":"boolean"},{"default":"[runtime expression]","required":false,"hint":"Override the default datasource","name":"dataSource","type":"string"}],"availableIn":["model"],"name":"findByKey","tags":{"categoryClass":"readfunctions","sectionClass":"modelclass","category":"Read Functions","section":"Model Class"}},{"extended":{"hasExtended":false,"docs":""},"hint":"","returntype":"any","slug":"controller.findESS","parameters":[{"required":false,"name":"zipcode","type":"string"}],"availableIn":["controller"],"name":"findESS","tags":{"categoryClass":"","sectionClass":"","category":"","section":""}},{"extended":{"hasExtended":false,"docs":""},"hint":"Fetches the first record ordered by primary key value.\r\nUse the <code>property</code> argument to order by something else.\r\nReturns a model object.\r\n\r\n","returntype":"any","slug":"model.findFirst","parameters":[{"default":"[runtime expression]","required":false,"hint":"Name of the property to order by. This argument is also aliased as `properties`.","name":"property","type":"string"},{"default":"ASC","required":false,"name":"$sort","type":"string"}],"availableIn":["model"],"name":"findFirst","tags":{"categoryClass":"readfunctions","sectionClass":"modelclass","category":"Read Functions","section":"Model Class"}},{"extended":{"hasExtended":false,"docs":""},"hint":"Fetches the last record ordered by primary key value.\r\nUse the <code>property</code> argument to order by something else.\r\nReturns a model object. Formerly known as findLast.\r\n\r\n","returntype":"any","slug":"model.findLastOne","parameters":[{"required":false,"hint":"Name of the property to order by. This argument is also aliased as `properties`.","name":"property","type":"string"}],"availableIn":["model"],"name":"findLastOne","tags":{"categoryClass":"readfunctions","sectionClass":"modelclass","category":"Read Functions","section":"Model Class"}},{"extended":{"hasExtended":false,"docs":""},"hint":"","returntype":"any","slug":"controller.findMRB","parameters":[{"required":false,"name":"zipcode","type":"string"}],"availableIn":["controller"],"name":"findMRB","tags":{"categoryClass":"","sectionClass":"","category":"","section":""}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Getting the most recent order as an object from the database\norder = model(&quot;order&quot;).findOne(order=&quot;datePurchased DESC&quot;);\n\n// Using a dynamic finder to get the first person with the last name `Smith`. Same as calling `model(&quot;user&quot;).findOne(where&quot;lastName='Smith'&quot;)`\nperson = model(&quot;user&quot;).findOneByLastName(&quot;Smith&quot;);\n\n// Getting a specific user using a dynamic finder. Same as calling `model(&quot;user&quot;).findOne(where&quot;email='someone@somewhere.com' AND password='mypass'&quot;)`\nuser = model(&quot;user&quot;).findOneByEmailAndPassword(&quot;someone@somewhere.com,mypass&quot;);\n\n// If you have a `hasOne` association setup from `user` to `profile`, you can do a scoped call. (The `profile` method below will call `model(&quot;profile&quot;).findOne(where=&quot;userId=#user.id#&quot;)` internally)\nuser = model(&quot;user&quot;).findByKey(params.userId);\nprofile = user.profile();\n\n// If you have a `hasMany` association setup from `post` to `comment`, you can do a scoped call. (The `findOneComment` method below will call `model(&quot;comment&quot;).findOne(where=&quot;postId=#post.id#&quot;)` internally)\npost = model(&quot;post&quot;).findByKey(params.postId);\ncomment = post.findOneComment(where=&quot;text='I Love Wheels!'&quot;);</code></pre>"},"hint":"Fetches the first record found based on the <code>WHERE</code> and <code>ORDER BY</code> clauses.\r\nWith the default settings (i.e. the <code>returnAs</code> argument set to <code>object</code>), a model object will be returned if the record is found and the boolean value <code>false</code> if not.\r\nInstead of using the <code>where</code> argument, you can create cleaner code by making use of a concept called Dynamic Finders.\r\n\r\n","returntype":"any","slug":"model.findOne","parameters":[{"default":"","required":false,"hint":"Maps to the `WHERE` clause of the query (or `HAVING` when necessary). The following operators are supported: `=`, `!=`, `<>`, `<`, `<=`, `>`, `>=`, `LIKE`, `NOT LIKE`, `IN`, `NOT IN`, `IS NULL`, `IS NOT NULL`, `AND`, and `OR` (note that the key words need to be written in upper case). You can also use parentheses to group statements. You do not need to specify the table name(s); CFWheels will do that for you.","name":"where","type":"string"},{"default":"","required":false,"hint":"Maps to the `ORDER` BY clause of the query. You do not need to specify the table name(s); CFWheels will do that for you.","name":"order","type":"string"},{"default":"","required":false,"hint":"Determines how the `SELECT` clause for the query used to return data will look. You can pass in a list of the properties (which map to columns) that you want returned from your table(s). If you don't set this argument at all, CFWheels will select all properties from your table(s). If you specify a table name (e.g. `users.email`) or alias a column (e.g. `fn AS firstName`) in the list, then the entire list will be passed through unchanged and used in the `SELECT` clause of the query. By default, all column names in tables joined via the `include` argument will be prepended with the singular version of the included table name.","name":"select","type":"string"},{"default":"","required":false,"hint":"Associations that should be included in the query using `INNER` or `LEFT OUTER` joins (which join type that is used depends on how the association has been set up in your model). If all included associations are set on the current model, you can specify them in a list (e.g. `department,addresses,emails`). You can build more complex include strings by using parentheses when the association is set on an included model, like `album(artist(genre))`, for example. These complex `include` strings only work when `returnAs` is set to `query` though.","name":"include","type":"string"},{"default":"query","required":false,"hint":"Handle to use for the query. This is used to set the name of the query in the debug output (which otherwise defaults to `userFindOneQuery` for example).","name":"handle","type":"string"},{"default":"","required":false,"hint":"If you want to cache the query, you can do so by specifying the number of minutes you want to cache the query for here. If you set it to `true`, the default cache time will be used (60 minutes).","name":"cache","type":"any"},{"default":false,"required":false,"hint":"Set to `true` to force CFWheels to query the database even though an identical query for this model may have been run in the same request. (The default in CFWheels is to get the second query from the model's request-level cache.)","name":"reload","type":"boolean"},{"default":true,"required":false,"hint":"Set to `true` to use `cfqueryparam` on all columns, or pass in a list of property names to use `cfqueryparam` on those only.","name":"parameterize","type":"any"},{"default":"object","required":false,"hint":"Set to `objects` to return an array of objects, set to `structs` to return an array of structs, set to `query` to return a query result set, or set to 'sql' to return the executed SQL query as a string.","name":"returnAs","type":"string"},{"default":"false","required":false,"hint":"Set to `true` to include soft-deleted records in the queries that this method runs.","name":"includeSoftDeletes","type":"boolean"},{"default":"[runtime expression]","required":false,"hint":"If you want to specify table index hints, pass in a structure of index names using your model names as the structure keys. Eg: `{user=\"idx_users\", post=\"idx_posts\"}`. This feature is only supported by MySQL and SQL Server.","name":"useIndex","type":"struct"},{"default":"[runtime expression]","required":false,"hint":"Override the default datasource","name":"dataSource","type":"string"}],"availableIn":["model"],"name":"findOne","tags":{"categoryClass":"readfunctions","sectionClass":"modelclass","category":"Read Functions","section":"Model Class"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Get the current value of notice in the Flash\nnotice = flash(&quot;notice&quot;);\n\n// Get the entire Flash as a struct\nflashContents = flash();</code></pre>"},"hint":"Returns the value of a specific key in the Flash (or the entire Flash as a struct if no key is passed in).\r\n\r\n","returntype":"any","slug":"controller.flash","parameters":[{"required":false,"hint":"The key to get the value for.","name":"key","type":"string"}],"availableIn":["controller"],"name":"flash","tags":{"categoryClass":"flashfunctions","sectionClass":"controller","category":"Flash Functions","section":"Controller"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>flashClear();</code></pre>"},"hint":"Deletes everything from the Flash.\r\n\r\n","returntype":"void","slug":"controller.flashClear","parameters":[],"availableIn":["controller"],"name":"flashClear","tags":{"categoryClass":"flashfunctions","sectionClass":"controller","category":"Flash Functions","section":"Controller"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>count = flashCount();</code></pre>"},"hint":"Returns how many keys exist in the Flash.\r\n\r\n","returntype":"numeric","slug":"controller.flashCount","parameters":[],"availableIn":["controller"],"name":"flashCount","tags":{"categoryClass":"flashfunctions","sectionClass":"controller","category":"Flash Functions","section":"Controller"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>flashDelete(key=&quot;errorMessage&quot;);</code></pre>"},"hint":"Deletes a specific key from the Flash.\r\nReturns <code>true</code> if the key exists.\r\n\r\n","returntype":"any","slug":"controller.flashDelete","parameters":[{"required":true,"hint":"The key to delete","name":"key","type":"string"}],"availableIn":["controller"],"name":"flashDelete","tags":{"categoryClass":"flashfunctions","sectionClass":"controller","category":"Flash Functions","section":"Controller"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>flashInsert(msg=&quot;It Worked!&quot;);</code></pre>"},"hint":"Inserts a new key / value into the Flash.\r\n\r\n","returntype":"void","slug":"controller.flashInsert","parameters":[],"availableIn":["controller"],"name":"flashInsert","tags":{"categoryClass":"flashfunctions","sectionClass":"controller","category":"Flash Functions","section":"Controller"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>empty = flashIsEmpty();</code></pre>"},"hint":"Returns whether or not the Flash is empty.\r\n\r\n","returntype":"boolean","slug":"controller.flashIsEmpty","parameters":[],"availableIn":["controller"],"name":"flashIsEmpty","tags":{"categoryClass":"flashfunctions","sectionClass":"controller","category":"Flash Functions","section":"Controller"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Keep the entire Flash for the next request\nflashKeep();\n\n// Keep the &quot;error&quot; key in the Flash for the next request\nflashKeep(&quot;error&quot;);\n\n// Keep both the &quot;error&quot; and &quot;success&quot; keys in the Flash for the next request\nflashKeep(&quot;error,success&quot;);</code></pre>"},"hint":"Make the entire Flash or specific key in it stick around for one more request.\r\n\r\n","returntype":"void","slug":"controller.flashKeep","parameters":[{"default":"","required":false,"name":"key","type":"string"}],"availableIn":["controller"],"name":"flashKeep","tags":{"categoryClass":"flashfunctions","sectionClass":"controller","category":"Flash Functions","section":"Controller"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>errorExists = flashKeyExists(&quot;error&quot;);</code></pre>"},"hint":"Checks if a specific key exists in the Flash.\r\n\r\n","returntype":"boolean","slug":"controller.flashKeyExists","parameters":[{"required":true,"hint":"The key to check.","name":"key","type":"string"}],"availableIn":["controller"],"name":"flashKeyExists","tags":{"categoryClass":"flashfunctions","sectionClass":"controller","category":"Flash Functions","section":"Controller"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// In the controller action\nflashInsert(success=&quot;Your post was successfully submitted.&quot;);\nflashInsert(alert=&quot;Don't forget to tweet about this post!&quot;);\nflashInsert(error=&quot;This is an error message.&quot;);\n\n&lt;!--- In the layout or view ---&gt;\n#flashMessages()#\n\n&lt;!--- Generates this (sorted alphabetically):---&gt;\n&lt;div class=&quot;flashMessages&quot;&gt;\n\t&lt;p class=&quot;alertMessage&quot;&gt;\n\t\tDon't forget to tweet about this post!\n\t&lt;/p&gt;\n\t&lt;p class=&quot;errorMessage&quot;&gt;\n\t\tThis is an error message.\n\t&lt;/p&gt;\n\t&lt;p class=&quot;successMessage&quot;&gt;\n\t\tYour post was successfully submitted.\n\t&lt;/p&gt;\n&lt;/div&gt;\n\n\n&lt;!---  Only show the &quot;success&quot; key in the view ---&gt;\n#flashMessages(key=&quot;success&quot;)#\n\n&lt;!--- Generates this: ---&gt;\n&lt;div class=&quot;flashMessage&quot;&gt;\n\t&lt;p class=&quot;successMessage&quot;&gt;\n\t\tYour post was successfully submitted.\n\t&lt;/p&gt;\n&lt;/div&gt;\n\n\n&lt;!--- Show only the &quot;success&quot; and &quot;alert&quot; keys in the view, in that order ---&gt;\n#flashMessages(keys=&quot;success,alert&quot;)#\n\n&lt;!--- Generates this (sorted alphabetically):---&gt;\n&lt;div class=&quot;flashMessages&quot;&gt;\n\t&lt;p class=&quot;successMessage&quot;&gt;\n\t\tYour post was successfully submitted.\n\t&lt;/p&gt;\n\t&lt;p class=&quot;alertMessage&quot;&gt;\n\t\tDon't forget to tweet about this post!\n\t&lt;/p&gt;\n&lt;/div&gt;</code></pre>"},"hint":"Displays a marked-up listing of messages that exist in the Flash.\r\n\r\n","returntype":"string","slug":"controller.flashMessages","parameters":[{"required":false,"hint":"The key (or list of keys) to show the value for. You can also use the `key` argument instead for better readability when accessing a single key.","name":"keys","type":"string"},{"default":"flash-messages","required":false,"hint":"HTML `class` to set on the `div` element that contains the messages.","name":"class","type":"string"},{"default":"false","required":false,"hint":"Includes the `div` container even if the Flash is empty.","name":"includeEmptyContainer","type":"boolean"},{"default":true,"required":false,"hint":"Use this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to `true` to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to `attributes` to only encode attribute values and not tag content.","name":"encode","type":"boolean"}],"availableIn":["controller"],"name":"flashMessages","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"viewhelpers","category":"Miscellaneous Functions","section":"View Helpers"}},{"extended":{"hasExtended":false,"docs":""},"hint":"adds float columns to table definition\r\n\r\n","returntype":"any","slug":"tabledefinition.float","parameters":[{"required":false,"name":"columnNames","type":"string"},{"default":"","required":false,"name":"default","type":"string"},{"default":"true","required":false,"name":"null","type":"boolean"}],"availableIn":["tabledefinition"],"name":"float","tags":{"categoryClass":"tabledefinitionfunctions","sectionClass":"migrator","category":"Table Definition Functions","section":"Migrator"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Get the current value for the `tableNamePrefix` Wheels setting\nsetting = get(&quot;tableNamePrefix&quot;);\n\n// Get the default for the `message` argument of the `validatesConfirmationOf` method\nsetting = get(functionName=&quot;validatesConfirmationOf&quot;, name=&quot;message&quot;);</code></pre>"},"hint":"Returns the current setting for the supplied CFWheels setting or the current default for the supplied CFWheels function argument.\r\n\r\n","returntype":"any","slug":"controller.get","parameters":[{"required":true,"hint":"Variable name to get setting for.","name":"name","type":"string"},{"default":"","required":false,"hint":"Function name to get setting for.","name":"functionName","type":"string"}],"availableIn":["controller","model","test","migrator","migration","tabledefinition"],"name":"get","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"configuration","category":"Miscellaneous Functions","section":"Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;cfscript&gt;\n\nmapper()\n    // Route name:  post\n    // Example URL: /posts/my-post-title\n    // Controller:  Posts\n    // Action:      show\n    .get(name=&quot;post&quot;, pattern=&quot;posts/[slug]&quot;, to=&quot;posts##show&quot;)\n\n    // Route name:  posts\n    // Example URL: /posts\n    // Controller:  Posts\n    // Action:      index\n    .get(name=&quot;posts&quot;, controller=&quot;posts&quot;, action=&quot;index&quot;)\n\n    // Route name:  authors\n    // Example URL: /the-scribes\n    // Controller:  Authors\n    // Action:      index\n    .get(name=&quot;authors&quot;, pattern=&quot;the-scribes&quot;, to=&quot;authors##index&quot;)\n\n    // Route name:  commerceCart\n    // Example URL: /cart\n    // Controller:  commerce.Carts\n    // Action:      show\n    .get(name=&quot;cart&quot;, to=&quot;carts##show&quot;, package=&quot;commerce&quot;)\n\n    // Route name:  extranetEditProfile\n    // Example URL: /profile/edit\n    // Controller:  extranet.Profiles\n    // Action:      edit\n    .get(\n        name=&quot;editProfile&quot;,\n        pattern=&quot;profile/edit&quot;,\n        to=&quot;profiles##edit&quot;,\n        package=&quot;extranet&quot;\n    )\n\n    // Example scoping within a nested resource\n    .resources(name=&quot;users&quot;, nested=true)\n        // Route name:  activatedUsers\n        // Example URL: /users/activated\n        // Controller:  Users\n        // Action:      activated\n        .get(name=&quot;activated&quot;, to=&quot;users##activated&quot;, on=&quot;collection&quot;)\n\n        // Route name:  preferencesUsers\n        // Example URL: /users/391/preferences\n        // Controller:  Preferences\n        // Action:      index\n        .get(name=&quot;preferences&quot;, to=&quot;preferences##index&quot;, on=&quot;member&quot;)\n    .end()\n.end();\n\n&lt;/cfscript&gt;\n</code></pre>"},"hint":"Create a route that matches a URL requiring an HTTP <code>GET</code> method. We recommend only using this matcher to expose actions that display data. See <code>post</code>, <code>patch</code>, <code>delete</code>, and <code>put</code> for matchers that are appropriate for actions that change data in your database.\r\n\r\n","returntype":"struct","slug":"mapper.get","parameters":[{"required":false,"hint":"Camel-case name of route to reference when build links and form actions (e.g., `blogPost`).","name":"name","type":"string"},{"required":false,"hint":"Overrides the URL pattern that will match the route. The default value is a dasherized version of `name` (e.g., a `name` of `blogPost` generates a pattern of `blog-post`).","name":"pattern","type":"string"},{"required":false,"hint":"Set `controller##action` combination to map the route to. You may use either this argument or a combination of `controller` and `action`.","name":"to","type":"string"},{"required":false,"hint":"Map the route to a given controller. This must be passed along with the `action` argument.","name":"controller","type":"string"},{"required":false,"hint":"Map the route to a given action within the `controller`. This must be passed along with the `controller` argument.","name":"action","type":"string"},{"required":false,"hint":"Indicates a subfolder that the controller will be referenced from (but not added to the URL pattern). For example, if you set this to `admin`, the controller will be located at `admin/YourController.cfc`, but the URL path will not contain `admin/`.","name":"package","type":"string"},{"required":false,"hint":"If this route is within a nested resource, you can set this argument to `member` or `collection`. A `member` route contains a reference to the resource's `key`, while a `collection` route does not.","name":"on","type":"string"},{"required":false,"hint":"Redirect via 302 to this URL when this route is matched. Has precedence over controller/action. Use either an absolute link like `/about/`, or a full canonical link.","name":"redirect","type":"string"}],"availableIn":["mapper"],"name":"get","tags":{"categoryClass":"routing","sectionClass":"configuration","category":"Routing","section":"Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Get array of available migrations\nmigrations = application.wheels.migrator.getAvailableMigrations();\n\nif(ArrayLen(migrations)){\n\t latestVersion = migrations[ArrayLen(migrations)].version;\n} else {\n\t latestVersion = 0;\n}\n</code></pre>"},"hint":"Searches db/migrate folder for migrations. Whilst you can use this in your application, the recommended useage is via either the CLI or the provided GUI interface\r\n\r\n","returntype":"array","slug":"migrator.getAvailableMigrations","parameters":[{"default":"[runtime expression]","required":false,"hint":"Path to Migration Files: defaults to /migrator/migrations/","name":"path","type":"string"}],"availableIn":["migrator"],"name":"getAvailableMigrations","tags":{"categoryClass":"generalfunctions","sectionClass":"migrator","category":"General Functions","section":"Migrator"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Get current database version\ncurrentVersion = application.wheels.migrator.getCurrentMigrationVersion();\n</code></pre>"},"hint":"Returns current database version. Whilst you can use this in your application, the recommended useage is via either the CLI or the provided GUI interface\r\n\r\n","returntype":"string","slug":"migrator.getCurrentMigrationVersion","parameters":[],"availableIn":["migrator"],"name":"getCurrentMigrationVersion","tags":{"categoryClass":"generalfunctions","sectionClass":"migrator","category":"General Functions","section":"Migrator"}},{"extended":{"hasExtended":false,"docs":""},"hint":"Primarily used for testing to get information about emails sent during the request.\r\n\r\n","returntype":"array","slug":"controller.getEmails","parameters":[],"availableIn":["controller"],"name":"getEmails","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"controller","category":"Miscellaneous Functions","section":"Controller"}},{"extended":{"hasExtended":false,"docs":""},"hint":"Primarily used for testing to get information about files sent during the request.\r\n\r\n","returntype":"array","slug":"controller.getFiles","parameters":[],"availableIn":["controller"],"name":"getFiles","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"controller","category":"Miscellaneous Functions","section":"Controller"}},{"extended":{"hasExtended":false,"docs":""},"hint":"","returntype":"string","slug":"controller.getLang","parameters":[{"required":true,"name":"key","type":"string"}],"availableIn":["controller","model"],"name":"getLang","tags":{"categoryClass":"","sectionClass":"","category":"","section":""}},{"extended":{"hasExtended":false,"docs":""},"hint":"Primarily used for testing to establish whether the current request has performed a redirect.\r\n\r\n","returntype":"struct","slug":"controller.getRedirect","parameters":[],"availableIn":["controller"],"name":"getRedirect","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"controller","category":"Miscellaneous Functions","section":"Controller"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Get the table name prefix for this user when running a custom query.\n&lt;cffunction name=&quot;getDisabledUsers&quot; returntype=&quot;query&quot;&gt;\n\t&lt;cfquery datasource=&quot;#get('dataSourceName')#&quot; name=&quot;local.disabledUsers&quot;&gt;\n\tSELECT *\n\tFROM #this.getTableNamePrefix()#users\n\tWHERE disabled = 1\n\t&lt;/cfquery&gt;\n\t&lt;cfreturn local.disabledUsers&gt;\n&lt;/cffunction&gt;\n</code></pre>"},"hint":"Returns the table name prefix set for the table.\r\n\r\n","returntype":"string","slug":"model.getTableNamePrefix","parameters":[],"availableIn":["model"],"name":"getTableNamePrefix","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"modelclass","category":"Miscellaneous Functions","section":"Model Class"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Get a member object and change the `email` property on it\nmember = model(&quot;member&quot;).findByKey(params.memberId);\nmember.email = params.newEmail;\n\n// Check if the `email` property has changed\nif(member.hasChanged(&quot;email&quot;)){\n    // Do something...\n}\n\n// The above can also be done using a dynamic function like this\nif(member.emailHasChanged()){\n    // Do something...\n}</code></pre>"},"hint":"Returns <code>true</code> if the specified property (or any if none was passed in) has been changed but not yet saved to the database.\r\nWill also return <code>true</code> if the object is new and no record for it exists in the database.\r\n\r\n","returntype":"boolean","slug":"model.hasChanged","parameters":[{"default":"","required":false,"hint":"Name of property to check for change.","name":"property","type":"string"}],"availableIn":["model"],"name":"hasChanged","tags":{"categoryClass":"changefunctions","sectionClass":"modelobject","category":"Change Functions","section":"Model Object"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Check if the post object has any errors set on it \nif(post.hasErrors()){\n    // Send user to a form to correct the errors... \n}</code></pre>"},"hint":"Returns <code>true</code> if the object has any errors.\r\nYou can also limit to only check a specific property or name for errors.\r\n\r\n","returntype":"boolean","slug":"model.hasErrors","parameters":[{"default":"","required":false,"hint":"Name of the property to check if there are any errors set on.","name":"property","type":"string"},{"default":"","required":false,"hint":"Error name to check if there are any errors set with.","name":"name","type":"string"}],"availableIn":["model"],"name":"hasErrors","tags":{"categoryClass":"errorfunctions","sectionClass":"modelobject","category":"Error Functions","section":"Model Object"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Specify that instances of this model has many comments (the table for the associated model, not the current, should have the foreign key set on it).\nhasMany(&quot;comments&quot;);\n\n// Specify that this model (let's call it `reader` in this case) has many subscriptions and setup a shortcut to the `publication` model (useful when dealing with many-to-many relationships).\nhasMany(name=&quot;subscriptions&quot;, shortcut=&quot;publications&quot;);\n\n// Automatically delete all associated `comments` whenever this object is deleted.\nhasMany(name=&quot;comments&quot;, dependent=&quot;deleteAll&quot;);\n\n// When not following CFWheels naming conventions for associations, it can get complex to define how a `shortcut` works.\n// In this example, we are naming our `shortcut` differently than the actual model's name.\n\n// In the models/Customer.cfc `config()` method.\nhasMany(name=&quot;subscriptions&quot;, shortcut=&quot;magazines&quot;, through=&quot;publication,subscriptions&quot;);\n\n// In the models/Subscription.cfc `config()` method.\nbelongsTo(&quot;customer&quot;);\nbelongsTo(&quot;publication&quot;);\n\n// In the models/Publication `config()` method.\nhasMany(&quot;subscriptions&quot;);\n</code></pre>"},"hint":"Sets up a <code>hasMany</code> association between this model and the specified one.\r\n\r\n","returntype":"void","slug":"model.hasMany","parameters":[{"required":true,"hint":"Gives the association a name that you refer to when working with the association (in the `include` argument to `findAll`, to name one example).","name":"name","type":"string"},{"default":"","required":false,"hint":"Name of associated model (usually not needed if you follow CFWheels conventions because the model name will be deduced from the `name` argument).","name":"modelName","type":"string"},{"default":"","required":false,"hint":"Foreign key property name (usually not needed if you follow CFWheels conventions since the foreign key name will be deduced from the `name` argument).","name":"foreignKey","type":"string"},{"default":"","required":false,"hint":"Column name to join to if not the primary key (usually not needed if you follow CFWheels conventions since the join key will be the table's primary key/keys).","name":"joinKey","type":"string"},{"default":"outer","required":false,"hint":"Use to set the join type when joining associated tables. Possible values are `inner` (for `INNER JOIN`) and `outer` (for `LEFT OUTER JOIN`).","name":"joinType","type":"string"},{"default":false,"required":false,"hint":"Defines how to handle dependent model objects when you delete an object from this model. `delete` / `deleteAll` deletes the record(s) (`deleteAll` bypasses object instantiation). `remove` / `removeAll` sets the forein key field(s) to `NULL` (`removeAll` bypasses object instantiation).","name":"dependent","type":"string"},{"default":"","required":false,"hint":"Set this argument to create an additional dynamic method that gets the object(s) from the other side of a many-to-many association.","name":"shortcut","type":"string"},{"default":"[runtime expression]","required":false,"hint":"Set this argument if you need to override CFWheels conventions when using the `shortcut` argument. Accepts a list of two association names representing the chain from the opposite side of the many-to-many relationship to this model.","name":"through","type":"string"}],"availableIn":["model"],"name":"hasMany","tags":{"categoryClass":"associationfunctions","sectionClass":"modelconfiguration","category":"Association Functions","section":"Model Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;!--- Show check boxes for associating authors with the current book ---&gt;\n&lt;cfloop query=&quot;authors&quot;&gt;\n    #hasManyCheckBox(\n        label=authors.fullName,\n        objectName=&quot;book&quot;,\n        association=&quot;bookAuthors&quot;,\n        keys=&quot;#book.key()#,#authors.id#&quot;\n    )#\n&lt;/cfloop&gt;</code></pre>"},"hint":"Used as a shortcut to output the proper form elements for an association.\r\nNote: Pass any additional arguments like class, rel, and id, and the generated tag will also include those values as HTML attributes.\r\n\r\n","returntype":"string","slug":"controller.hasManyCheckBox","parameters":[{"required":true,"hint":"Name of the variable containing the parent object to represent with this form field.","name":"objectName","type":"string"},{"required":true,"hint":"Name of the association set in the parent object to represent with this form field.","name":"association","type":"string"},{"required":true,"hint":"Primary keys associated with this form field. Note that these keys should be listed in the order that they appear in the database table.","name":"keys","type":"string"},{"required":false,"hint":"The label text to use in the form control.","name":"label","type":"string"},{"required":false,"hint":"Whether to place the label before, after, or wrapped around the form control. Label text placement can be controlled using `aroundLeft` or `aroundRight`.","name":"labelPlacement","type":"string"},{"required":false,"hint":"String to prepend to the form control. Useful to wrap the form control with HTML tags.","name":"prepend","type":"string"},{"required":false,"hint":"String to append to the form control. Useful to wrap the form control with HTML tags.","name":"append","type":"string"},{"required":false,"hint":"String to prepend to the form control's label. Useful to wrap the form control with HTML tags.","name":"prependToLabel","type":"string"},{"required":false,"hint":"String to append to the form control's label. Useful to wrap the form control with HTML tags.","name":"appendToLabel","type":"string"},{"required":false,"hint":"HTML tag to wrap the form control with when the object contains errors.","name":"errorElement","type":"string"},{"required":false,"hint":"The `class` name of the HTML tag that wraps the form control when there are errors.","name":"errorClass","type":"string"},{"default":true,"required":false,"hint":"Use this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to `true` to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to `attributes` to only encode attribute values and not tag content.","name":"encode","type":"any"}],"availableIn":["controller"],"name":"hasManyCheckBox","tags":{"categoryClass":"formassociationfunctions","sectionClass":"viewhelpers","category":"Form Association Functions","section":"View Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;!--- Show radio buttons for associating a default address with the current author ---&gt;\n&lt;cfloop query=&quot;addresses&quot;&gt;\n    #hasManyRadioButton(\n        label=addresses.title,\n        objectName=&quot;author&quot;,\n        association=&quot;authorsDefaultAddresses&quot;,\n        keys=&quot;#author.key()#,#addresses.id#&quot;\n    )#\n&lt;/cfloop&gt;</code></pre>"},"hint":"Used as a shortcut to output the proper form elements for an association.\r\nNote: Pass any additional arguments like class, rel, and id, and the generated tag will also include those values as HTML attributes.\r\n\r\n","returntype":"string","slug":"controller.hasManyRadioButton","parameters":[{"required":true,"hint":"Name of the variable containing the parent object to represent with this form field.","name":"objectName","type":"string"},{"required":true,"hint":"Name of the association set in the parent object to represent with this form field.","name":"association","type":"string"},{"required":true,"hint":"Name of the property in the child object to represent with this form field.","name":"property","type":"string"},{"required":true,"hint":"Primary keys associated with this form field. Note that these keys should be listed in the order that they appear in the database table.","name":"keys","type":"string"},{"required":true,"hint":"The value of the radio button when selected.","name":"tagValue","type":"string"},{"default":false,"required":false,"hint":"Whether or not to check this form field as a default if there is a blank value set for the property.","name":"checkIfBlank","type":"boolean"},{"required":false,"hint":"The label text to use in the form control.","name":"label","type":"string"},{"default":true,"required":false,"hint":"Use this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to `true` to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to `attributes` to only encode attribute values and not tag content.","name":"encode","type":"any"}],"availableIn":["controller"],"name":"hasManyRadioButton","tags":{"categoryClass":"formassociationfunctions","sectionClass":"viewhelpers","category":"Form Association Functions","section":"View Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Specify that instances of this model has one profile. (The table for the associated model, not the current, should have the foreign key set on it.)\nhasOne(&quot;profile&quot;);\n\n// Same as above but setting the `joinType` to `inner`, which basically means this model should always have a record in the `profiles` table.\nhasOne(name=&quot;profile&quot;, joinType=&quot;inner&quot;);\n\n// Automatically delete the associated `profile` whenever this object is deleted.\nhasMany(name=&quot;comments&quot;, dependent=&quot;delete&quot;);\n</code></pre>"},"hint":"Sets up a <code>hasOne</code> association between this model and the specified one.\r\n\r\n","returntype":"void","slug":"model.hasOne","parameters":[{"required":true,"hint":"Gives the association a name that you refer to when working with the association (in the `include` argument to `findAll`, to name one example).","name":"name","type":"string"},{"default":"","required":false,"hint":"Name of associated model (usually not needed if you follow CFWheels conventions because the model name will be deduced from the `name` argument).","name":"modelName","type":"string"},{"default":"","required":false,"hint":"Foreign key property name (usually not needed if you follow CFWheels conventions since the foreign key name will be deduced from the `name` argument).","name":"foreignKey","type":"string"},{"default":"","required":false,"hint":"Column name to join to if not the primary key (usually not needed if you follow CFWheels conventions since the join key will be the table's primary key/keys).","name":"joinKey","type":"string"},{"default":"outer","required":false,"hint":"Use to set the join type when joining associated tables. Possible values are `inner` (for `INNER JOIN`) and `outer` (for `LEFT OUTER JOIN`).","name":"joinType","type":"string"},{"default":false,"required":false,"hint":"Defines how to handle dependent model objects when you delete an object from this model. `delete` / `deleteAll` deletes the record(s) (`deleteAll` bypasses object instantiation). `remove` / `removeAll` sets the forein key field(s) to `NULL` (`removeAll` bypasses object instantiation).","name":"dependent","type":"string"}],"availableIn":["model"],"name":"hasOne","tags":{"categoryClass":"associationfunctions","sectionClass":"modelconfiguration","category":"Association Functions","section":"Model Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Get an object, set a value and then see if the property exists\nemployee = model(&quot;employee&quot;).new();\nemployee.firstName = &quot;dude&quot;;\nemployee.hasProperty(&quot;firstName&quot;); // returns true\n\n// This is also a dynamic method that you could do\nemployee.hasFirstName();\n\n</code></pre>"},"hint":"Returns <code>true</code> if the specified property name exists on the model.\r\n\r\n","returntype":"boolean","slug":"model.hasProperty","parameters":[{"required":true,"hint":"Name of property to inspect.","name":"property","type":"string"}],"availableIn":["model"],"name":"hasProperty","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"modelobject","category":"Miscellaneous Functions","section":"Model Object"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;!--- Provide an `objectName` and `property` ---&gt;\n#hiddenField(objectName=&quot;user&quot;, property=&quot;id&quot;)#</code></pre>"},"hint":"Builds and returns a string containing a hidden field form control based on the supplied objectName and property.\r\nNote: Pass any additional arguments like class, rel, and id, and the generated tag will also include those values as HTML attributes.\r\n\r\n","returntype":"string","slug":"controller.hiddenField","parameters":[{"required":true,"hint":"The variable name of the object to build the form control for.","name":"objectName","type":"any"},{"required":true,"hint":"The name of the property to use in the form control.","name":"property","type":"string"},{"required":false,"hint":"The name of the association that the property is located on. Used for building nested forms that work with nested properties. If you are building a form with deep nesting, simply pass in a list to the nested object, and CFWheels will figure it out.","name":"association","type":"string"},{"required":false,"hint":"The position used when referencing a hasMany relationship in the association argument. Used for building nested forms that work with nested properties. If you are building a form with deep nestings, simply pass in a list of positions, and CFWheels will figure it out.","name":"position","type":"string"},{"default":true,"required":false,"hint":"Use this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to `true` to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to `attributes` to only encode attribute values and not tag content.","name":"encode","type":"boolean"}],"availableIn":["controller"],"name":"hiddenField","tags":{"categoryClass":"formobjectfunctions","sectionClass":"viewhelpers","category":"Form Object Functions","section":"View Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;!--- Basic usage usually involves a `name` and `value` ---&gt;\n#hiddenFieldTag(name=&quot;userId&quot;, value=user.id)#</code></pre>"},"hint":"Builds and returns a string containing a hidden field form control based on the supplied name.\r\nNote: Pass any additional arguments like <code>class</code>, <code>rel</code>, and <code>id</code>, and the generated tag will also include those values as HTML attributes.\r\n\r\n","returntype":"string","slug":"controller.hiddenFieldTag","parameters":[{"required":true,"hint":"Name to populate in tag's name attribute.","name":"name","type":"string"},{"default":"","required":false,"hint":"Value to populate in tag's value attribute.","name":"value","type":"string"},{"default":true,"required":false,"hint":"Use this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to `true` to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to `attributes` to only encode attribute values and not tag content.","name":"encode","type":"boolean"}],"availableIn":["controller"],"name":"hiddenFieldTag","tags":{"categoryClass":"formtagfunctions","sectionClass":"viewhelpers","category":"Form Tag Functions","section":"View Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;!--- Will output: You searched for: &lt;span class=&quot;highlight&quot;&gt;CFWheels ---&gt;\n#highlight(text=&quot;You searched for: CFWheels&quot;, phrases=&quot;CFWheels&quot;)#</code></pre>"},"hint":"Highlights the phrase(s) everywhere in the text if found by wrapping them in <code>span</code> tags.\r\n\r\n","returntype":"string","slug":"controller.highlight","parameters":[{"required":true,"hint":"Text to search in.","name":"text","type":"string"},{"required":false,"hint":"Phrase (or list of phrases) to highlight. This argument is also aliased as `phrases`.","name":"phrase","type":"string"},{"default":",","required":false,"hint":"Delimiter to use when passing in multiple phrases.","name":"delimiter","type":"string"},{"default":"span","required":false,"hint":"HTML tag to use to wrap the highlighted phrase(s).","name":"tag","type":"string"},{"default":"highlight","required":false,"hint":"Class to use in the tags wrapping highlighted phrase(s).","name":"class","type":"string"},{"default":true,"required":false,"hint":"Use this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to `true` to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to `attributes` to only encode attribute values and not tag content.","name":"encode","type":"boolean"}],"availableIn":["controller"],"name":"highlight","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"viewhelpers","category":"Miscellaneous Functions","section":"View Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;!---This &quot;Tag&quot; version of the function accepts a `name` and `selected` instead of binding to a model object ---&gt;\n#hourSelectTag(name=&quot;hourOfMeeting&quot;, selected=params.hourOfMeeting)#\n\n&lt;!---Show 12 hours instead of 24 ---&gt;\n#hourSelectTag(name=&quot;hourOfMeeting&quot;, selected=params.hourOfMeeting, twelveHour=true)#</code></pre>"},"hint":"Builds and returns a string containing one <code>select</code> form control for the hours of the day based on the supplied name.\r\n\r\n","returntype":"string","slug":"controller.hourSelectTag","parameters":[{"required":true,"hint":"Name to populate in tag's name attribute.","name":"name","type":"string"},{"default":"","required":false,"hint":"The day that should be selected initially.","name":"selected","type":"string"},{"default":false,"required":false,"hint":"Whether to include a blank option in the select form control. Pass true to include a blank line or a string that should represent what display text should appear for the empty value (for example, \"- Select One -\").","name":"includeBlank","type":"any"},{"default":"","required":false,"hint":"The label text to use in the form control.","name":"label","type":"string"},{"default":"around","required":false,"hint":"Whether to place the label before, after, or wrapped around the form control. Label text placement can be controlled using aroundLeft or aroundRight.","name":"labelPlacement","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control. Useful to wrap the form control with HTML tags.","name":"prepend","type":"string"},{"default":"","required":false,"hint":"String to append to the form control. Useful to wrap the form control with HTML tags.","name":"append","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control's label. Useful to wrap the form control with HTML tags.","name":"prependToLabel","type":"string"},{"default":"","required":false,"hint":"String to append to the form control's label. Useful to wrap the form control with HTML tags.","name":"appendToLabel","type":"string"},{"default":false,"required":false,"hint":"whether to display the hours in 24 or 12 hour format. 12 hour format has AM/PM drop downs","name":"twelveHour","type":"boolean"},{"default":true,"required":false,"hint":"Use this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to `true` to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to `attributes` to only encode attribute values and not tag content.","name":"encode","type":"any"},{"default":"[runtime expression]","required":false,"name":"$now","type":"date"}],"availableIn":["controller"],"name":"hourSelectTag","tags":{"categoryClass":"formtagfunctions","sectionClass":"viewhelpers","category":"Form Tag Functions","section":"View Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;!--- Humanize a string, will result in &quot;Wheels Is A Framework&quot; ---&gt;\n#humanize(&quot;wheelsIsAFramework&quot;)#\n\n&lt;!--- Humanize a string, force wheels to replace &quot;Cfml&quot; with &quot;CFML&quot; ---&gt;\n#humanize(&quot;wheelsIsACfmlFramework&quot;, &quot;CFML&quot;)#</code></pre>"},"hint":"Returns readable text by capitalizing and converting camel casing to multiple words.\r\n\r\n","returntype":"string","slug":"controller.humanize","parameters":[{"required":true,"hint":"Text to humanize.","name":"text","type":"string"},{"default":"","required":false,"hint":"A list of strings (space separated) to replace within the output.","name":"except","type":"string"}],"availableIn":["controller","model","test","mapper","migrator","migration","tabledefinition"],"name":"humanize","tags":{"categoryClass":"stringfunctions","sectionClass":"globalhelpers","category":"String Functions","section":"Global Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;!---Outputs &quot;my-blog-post&quot; ---&gt;\n#hyphenize(&quot;myBlogPost&quot;)#</code></pre>"},"hint":"Converts camelCase strings to lowercase strings with hyphens as word delimiters instead. Example: myVariable becomes my-variable.\r\n\r\n","returntype":"string","slug":"controller.hyphenize","parameters":[{"required":true,"hint":"The string to hyphenize.","name":"string","type":"string"}],"availableIn":["controller","model","test","mapper","migrator","migration","tabledefinition"],"name":"hyphenize","tags":{"categoryClass":"stringfunctions","sectionClass":"globalhelpers","category":"String Functions","section":"Global Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;!--- Outputs an `img` tag for `images/logo.png` ---&gt;\n#imageTag(&quot;logo.png&quot;)#\n\n&lt;!--- Outputs an `img` tag for `http://cfwheels.org/images/logo.png` ---&gt;\n#imageTag(source=&quot;http://cfwheels.org/images/logo.png&quot;, alt=&quot;ColdFusion on Wheels&quot;)#\n\n&lt;!--- Outputs an `img` tag with the `class` attribute set ---&gt;\n#imageTag(source=&quot;logo.png&quot;, class=&quot;logo&quot;)#</code></pre>"},"hint":"Returns an <code>img</code> tag.\r\nIf the image is stored in the local <code>images</code> folder, the tag will also set the <code>width</code>, <code>height</code>, and <code>alt</code> attributes for you.\r\nYou can pass any additional arguments (e.g. <code>class</code>, <code>rel</code>, <code>id</code>), and the generated tag will also include those values as HTML attributes.\r\n\r\n","returntype":"string","slug":"controller.imageTag","parameters":[{"required":true,"hint":"The file name of the image if it's available in the local file system (i.e. ColdFusion will be able to access it). Provide the full URL if the image is on a remote server.","name":"source","type":"string"},{"default":true,"required":false,"name":"onlyPath","type":"boolean"},{"default":"","required":false,"name":"host","type":"string"},{"default":"","required":false,"name":"protocol","type":"string"},{"default":0,"required":false,"name":"port","type":"numeric"},{"default":true,"required":false,"hint":"Use this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to `true` to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to `attributes` to only encode attribute values and not tag content.","name":"encode","type":"boolean"},{"default":true,"required":false,"name":"required","type":"boolean"}],"availableIn":["controller"],"name":"imageTag","tags":{"categoryClass":"assetfunctions","sectionClass":"viewhelpers","category":"Asset Functions","section":"View Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;!--- In your view template, let's say `views/blog/post.cfm---&gt;\ncontentFor(head='&lt;meta name=&quot;robots&quot; content=&quot;noindex,nofollow&quot;&gt;');\ncontentFor(head='&lt;meta name=&quot;author&quot; content=&quot;wheelsdude@wheelsify.com&quot;&gt;');\n\n// In `views/layout.cfm`\n&lt;html&gt;\n\t&lt;head&gt;\n\t    &lt;title&gt;My Site&lt;/title&gt;\n\t    #includeContent(&quot;head&quot;)#\n\t&lt;/head&gt;\n\t&lt;body&gt;\n\t\t&lt;cfoutput&gt;\n\t\t\t#includeContent()#\n\t\t&lt;/cfoutput&gt;\n\t&lt;/body&gt;\n&lt;/html&gt;</code></pre>"},"hint":"Used to output the content for a particular section in a layout.\r\n\r\n","returntype":"string","slug":"controller.includeContent","parameters":[{"default":"body","required":false,"hint":"Name of layout section to return content for.","name":"name","type":"string"},{"default":"","required":false,"hint":"What to display as a default if the section is not defined.","name":"defaultValue","type":"string"}],"availableIn":["controller"],"name":"includeContent","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"viewhelpers","category":"Miscellaneous Functions","section":"View Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Check to see if the customer is subscribed to the Swimsuit Edition. Note that the order of the `keys` argument should match the order of the `customerid` and `publicationid` columns in the `subscriptions` join table\nif(!includedInObject(objectName=&quot;customer&quot;, association=&quot;subscriptions&quot;, keys=&quot;#customer.key()#,#swimsuitEdition.id#&quot;)){\n    assignSalesman(customer);\n}</code></pre>"},"hint":"Used as a shortcut to check if the specified IDs are a part of the main form object.\r\nThis method should only be used for <code>hasMany</code> associations.\r\n\r\n","returntype":"boolean","slug":"controller.includedInObject","parameters":[{"required":true,"hint":"Name of the variable containing the parent object to represent with this form field.","name":"objectName","type":"string"},{"required":true,"hint":"Name of the association set in the parent object to represent with this form field.","name":"association","type":"string"},{"required":true,"hint":"Primary keys associated with this form field. Note that these keys should be listed in the order that they appear in the database table.","name":"keys","type":"string"}],"availableIn":["controller"],"name":"includedInObject","tags":{"categoryClass":"formassociationfunctions","sectionClass":"viewhelpers","category":"Form Association Functions","section":"View Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;!--- Make sure that the `sidebar` value is provided for the parent layout ---&gt;\n&lt;cfsavecontent variable=&quot;categoriesSidebar&quot;&gt;\n\t&lt;cfoutput&gt;\n\t\t&lt;ul&gt;\n\t\t\t#includePartial(categories)#\n\t\t&lt;/ul&gt;\n\t&lt;/cfoutput&gt;\n&lt;/cfsavecontent&gt;\ncontentFor(sidebar=categoriesSidebar);\n\n&lt;!---Include parent layout at `views/layout.cfm`---&gt;\n#includeLayout(&quot;/layout.cfm&quot;)#</code></pre>"},"hint":"Includes the contents of another layout file.\r\nThis is usually used to include a parent layout from within a child layout.\r\n\r\n","returntype":"string","slug":"controller.includeLayout","parameters":[{"default":"layout","required":false,"hint":"Name of the layout file to include.","name":"name","type":"string"}],"availableIn":["controller"],"name":"includeLayout","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"viewhelpers","category":"Miscellaneous Functions","section":"View Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>\n// If we're in the &quot;sessions&quot; controller, CFWheels will include the file &quot;views/sessions/_login.cfm&quot;.  \n#includePartial(&quot;login&quot;)# \n\n// CFWheels will include the file &quot;views/shared/_button.cfm&quot;.  \n#includePartial(partial=&quot;/shared/button&quot;)# \n\n// If we're in the &quot;posts&quot; controller and the &quot;posts&quot; variable includes a query result set, CFWheels will loop through the record set and include the file &quot;views/posts/_post.cfm&quot; for each record.  \n&lt;cfset posts = model(&quot;post&quot;).findAll()&gt; \n#includePartial(posts)# \n\n// We can also override the template file loaded for the example above.  \n#includePartial(partial=&quot;/shared/post&quot;, query=posts)# \n\n// The same works when passing a model instance.  \n&lt;cfset post = model(&quot;post&quot;).findByKey(params.key)&gt; #includePartial(post)# \n#includePartial(partial=&quot;/shared/post&quot;, object=post)# \n\n// The same works when passing an array of model objects.  \n&lt;cfset posts = model(&quot;post&quot;).findAll(returnAs=&quot;objects&quot;)&gt; \n#includePartial(posts)# \n#includePartial(partial=&quot;/shared/post&quot;, objects=posts)# \n&lt;/cfoutput&gt;\n\n</code></pre>"},"hint":"Includes the specified partial file in the view.\r\nSimilar to using <code>cfinclude</code> but with the ability to cache the result and use CFWheels-specific file look-up.\r\nBy default, CFWheels will look for the file in the current controller's view folder.\r\nTo include a file relative from the base <code>views</code> folder, you can start the path supplied to <code>partial</code> with a forward slash.\r\n\r\n","returntype":"string","slug":"controller.includePartial","parameters":[{"required":true,"hint":"The name of the partial file to be used. Prefix with a leading slash (`/`) if you need to build a path from the root `views` folder. Do not include the partial filename's underscore and file extension. If you want to have CFWheels display the partial for a single model object, array of model objects, or a query, pass a variable containing that data into this argument.","name":"partial","type":"any"},{"default":"","required":false,"hint":"If passing a query result set for the partial argument, use this to specify the field to group the query by. A new query will be passed into the partial template for you to iterate over.","name":"group","type":"string"},{"default":"","required":false,"hint":"Number of minutes to cache the content for.","name":"cache","type":"any"},{"default":"","required":false,"hint":"The layout to wrap the content in. Prefix with a leading slash (`/`) if you need to build a path from the root `views` folder. Pass `false` to not load a layout at all.","name":"layout","type":"string"},{"default":"","required":false,"hint":"HTML or string to place between partials when called using a query.","name":"spacer","type":"string"},{"default":true,"required":false,"hint":"Name of controller function to load data from.","name":"dataFunction","type":"any"},{"default":true,"required":false,"name":"$prependWithUnderscore","type":"boolean"}],"availableIn":["controller"],"name":"includePartial","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"viewhelpers","category":"Miscellaneous Functions","section":"View Helpers"}},{"extended":{"hasExtended":false,"docs":""},"hint":"adds integer columns to table definition\r\n\r\n","returntype":"any","slug":"tabledefinition.integer","parameters":[{"required":false,"name":"columnNames","type":"string"},{"required":false,"name":"limit","type":"numeric"},{"required":false,"name":"default","type":"string"},{"required":false,"name":"null","type":"boolean"}],"availableIn":["tabledefinition"],"name":"integer","tags":{"categoryClass":"tabledefinitionfunctions","sectionClass":"migrator","category":"Table Definition Functions","section":"Migrator"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// This is the method to be run inside a transaction.\npublic boolean function transferFunds(required any personFrom, required any personTo, required numeric amount) {\n\tif (arguments.personFrom.withdraw(arguments.amount) &amp;&amp; arguments.personTo.deposit(arguments.amount)) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}\n\nlocal.david = model(&quot;Person&quot;).findOneByName(&quot;David&quot;);\nlocal.mary = model(&quot;Person&quot;).findOneByName(&quot;Mary&quot;);\ninvokeWithTransaction(method=&quot;transferFunds&quot;, personFrom=local.david, personTo=local.mary, amount=100);\n</code></pre>"},"hint":"Runs the specified method within a single database transaction.\r\n\r\n","returntype":"any","slug":"model.invokeWithTransaction","parameters":[{"required":true,"hint":"Model method to run.","name":"method","type":"string"},{"default":"commit","required":false,"hint":"Set this to `commit` to update the database, `rollback` to run all the database queries but not commit them, or `none` to skip transaction handling altogether.","name":"transaction","type":"string"},{"default":"read_committed","required":false,"hint":"Isolation level to be passed through to the cftransaction tag. See your CFML engine's documentation for more details about cftransaction's isolation attribute.","name":"isolation","type":"string"}],"availableIn":["model"],"name":"invokeWithTransaction","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"modelclass","category":"Miscellaneous Functions","section":"Model Class"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>requestIsAjax = isAjax();</code></pre>"},"hint":"Returns whether the page was called from JavaScript or not.\r\n\r\n","returntype":"boolean","slug":"controller.isAjax","parameters":[],"availableIn":["controller"],"name":"isAjax","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"controller","category":"Miscellaneous Functions","section":"Controller"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Use the passed in `id` when we're already in an instance\nfunction memberIsAdmin(){\n\tif(isClass()){\n\t\treturn this.findByKey(arguments.id).admin;\n\t} else {\n\t\treturn this.admin;\n\t}\n}\n</code></pre>"},"hint":"Use this method to check whether you are currently in a class-level object.\r\n\r\n","returntype":"string","slug":"model.isClass","parameters":[],"availableIn":["model"],"name":"isClass","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"modelclass","category":"Miscellaneous Functions","section":"Model Class"}},{"extended":{"hasExtended":false,"docs":""},"hint":"Returns whether the request was a <code>DELETE</code> request or not.\r\n\r\n","returntype":"boolean","slug":"controller.isDelete","parameters":[],"availableIn":["controller"],"name":"isDelete","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"controller","category":"Miscellaneous Functions","section":"Controller"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>requestIsGet = isGet();</code></pre>"},"hint":"Returns whether the request was a normal <code>GET</code> request or not.\r\n\r\n","returntype":"boolean","slug":"controller.isGet","parameters":[],"availableIn":["controller"],"name":"isGet","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"controller","category":"Miscellaneous Functions","section":"Controller"}},{"extended":{"hasExtended":false,"docs":""},"hint":"Returns whether the request was a <code>HEAD</code> request or not.\r\n\r\n","returntype":"boolean","slug":"controller.isHead","parameters":[],"availableIn":["controller"],"name":"isHead","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"controller","category":"Miscellaneous Functions","section":"Controller"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Use the passed in `id` when we're not already in an instance\nfunction memberIsAdmin(){\n\tif(isInstance()){\n\t\treturn this.admin;\n\t} else {\n\t\treturn this.findByKey(arguments.id).admin;\n\t}\n}\n</code></pre>"},"hint":"Use this method to check whether you are currently in an instance object.\r\n\r\n","returntype":"boolean","slug":"model.isInstance","parameters":[],"availableIn":["model"],"name":"isInstance","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"modelclass","category":"Miscellaneous Functions","section":"Model Class"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Create a new object and then check if it is new (yes, this example is ridiculous. It makes more sense in the context of callbacks for example)\nemployee = model(&quot;employee&quot;).new()&gt;\n&lt;cfif employee.isNew()&gt;\n    // Do something...\n&lt;/cfif&gt;</code></pre>"},"hint":"Returns <code>true</code> if this object hasn't been saved yet (in other words, no matching record exists in the database yet).\r\nReturns <code>false</code> if a record exists.\r\n\r\n","returntype":"boolean","slug":"model.isNew","parameters":[],"availableIn":["model"],"name":"isNew","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"modelobject","category":"Miscellaneous Functions","section":"Model Object"}},{"extended":{"hasExtended":false,"docs":""},"hint":"Returns whether the request was an <code>OPTIONS</code> request or not.\r\n\r\n","returntype":"boolean","slug":"controller.isOptions","parameters":[],"availableIn":["controller"],"name":"isOptions","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"controller","category":"Miscellaneous Functions","section":"Controller"}},{"extended":{"hasExtended":false,"docs":""},"hint":"Returns whether the request was a <code>PATCH</code> request or not.\r\n\r\n","returntype":"boolean","slug":"controller.isPatch","parameters":[],"availableIn":["controller"],"name":"isPatch","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"controller","category":"Miscellaneous Functions","section":"Controller"}},{"extended":{"hasExtended":false,"docs":""},"hint":"Returns <code>true</code> if this object has been persisted to the database or was loaded from the database via a finder.\r\nReturns <code>false</code> if the record has not been persisted to the database.\r\n\r\n","returntype":"boolean","slug":"model.isPersisted","parameters":[],"availableIn":["model"],"name":"isPersisted","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"modelobject","category":"Miscellaneous Functions","section":"Model Object"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>requestIsPost = isPost();</code></pre>"},"hint":"Returns whether the request came from a form <code>POST</code> submission or not.\r\n\r\n","returntype":"boolean","slug":"controller.isPost","parameters":[],"availableIn":["controller"],"name":"isPost","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"controller","category":"Miscellaneous Functions","section":"Controller"}},{"extended":{"hasExtended":false,"docs":""},"hint":"Returns whether the request was a <code>PUT</code> request or not.\r\n\r\n","returntype":"boolean","slug":"controller.isPut","parameters":[],"availableIn":["controller"],"name":"isPut","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"controller","category":"Miscellaneous Functions","section":"Controller"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Redirect non-secure connections to the secure version\nif (!isSecure())\n{\n\tredirectTo(protocol=&quot;https&quot;);\n}</code></pre>"},"hint":"Returns whether CFWheels is communicating over a secure port.\r\n\r\n","returntype":"boolean","slug":"controller.isSecure","parameters":[],"availableIn":["controller"],"name":"isSecure","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"controller","category":"Miscellaneous Functions","section":"Controller"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;!--- View Code ---&gt;\n&lt;head&gt;\n    &lt;!--- Includes `javascripts/main.js` ---&gt;\n    #javaScriptIncludeTag(&quot;main&quot;)#\n\n    &lt;!--- Includes `javascripts/blog.js` and `javascripts/accordion.js` ---&gt;\n    #javaScriptIncludeTag(&quot;blog,accordion&quot;)#\n    \n    &lt;!--- Includes external JavaScript file ---&gt;\n    #javaScriptIncludeTag(&quot;https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js&quot;)#\n&lt;/head&gt;\n\n&lt;body&gt;\n    &lt;!--- Will still appear in the `head` ---&gt;\n    #javaScriptIncludeTag(source=&quot;tabs&quot;, head=true)#\n&lt;/body&gt;\n\n</code></pre>"},"hint":"Returns a <code>script</code> tag for a JavaScript file (or several) based on the supplied arguments.\r\n\r\n","returntype":"string","slug":"controller.javaScriptIncludeTag","parameters":[{"default":"","required":false,"hint":"The name of one or many JavaScript files in the `javascripts` folder, minus the `.js` extension. Pass a full URL to access an external JavaScript file. Can also be called with the `source` argument.","name":"sources","type":"string"},{"default":"text/javascript","required":false,"hint":"The `type` attribute for the `script` tag.","name":"type","type":"string"},{"default":false,"required":false,"hint":"Set to `true` to place the output in the `head` area of the HTML page instead of the default behavior (which is to place the output where the function is called from).","name":"head","type":"boolean"},{"default":",","required":false,"hint":"The delimiter to use for the list of JavaScript files.","name":"delim","type":"string"},{"default":true,"required":false,"hint":"Use this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to `true` to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to `attributes` to only encode attribute values and not tag content.","name":"encode","type":"boolean"}],"availableIn":["controller"],"name":"javaScriptIncludeTag","tags":{"categoryClass":"assetfunctions","sectionClass":"viewhelpers","category":"Asset Functions","section":"View Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Get an object and then get the primary key value(s)\nemployee = model(&quot;employee&quot;).findByKey(params.key);\nval = employee.key();</code></pre>"},"hint":"Returns the value of the primary key for the object.\r\nIf you have a single primary key named id, then <code>someObject.key()</code> is functionally equivalent to <code>someObject.id</code>.\r\nThis method is more useful when you do dynamic programming and don't know the name of the primary key or when you use composite keys (in which case it's convenient to use this method to get a list of both key values returned).\r\n\r\n","returntype":"string","slug":"model.key","parameters":[{"default":false,"required":false,"name":"$persisted","type":"boolean"},{"default":false,"required":false,"name":"$returnTickCountWhenNew","type":"boolean"}],"availableIn":["model"],"name":"key","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"modelobject","category":"Miscellaneous Functions","section":"Model Object"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>#linkTo(text=&quot;Log Out&quot;, controller=&quot;account&quot;, action=&quot;logout&quot;)#\n&lt;!--- Ouputs: &lt;a href=&quot;/account/logout&quot;&gt;Log Out&lt;/a&gt; ---&gt;\n\n&lt;!--- If you're already in the `account` controller, CFWheels will assume that's where you want the link to point ---&gt;\n#linkTo(text=&quot;Log Out&quot;, action=&quot;logout&quot;)#\n&lt;!--- Ouputs: &lt;a href=&quot;/account/logout&quot;&gt;Log Out&lt;/a&gt; ---&gt;\n\n#linkTo(text=&quot;View Post&quot;, controller=&quot;blog&quot;, action=&quot;post&quot;, key=99)#\n&lt;!--- Ouputs: &lt;a href=&quot;/blog/post/99&quot;&gt;View Post&lt;/a&gt; ---&gt;\n\n#linkTo(text=&quot;View Settings&quot;, action=&quot;settings&quot;, params=&quot;show=all&amp;amp;sort=asc&quot;)#\n&lt;!--- Ouputs: &lt;a href=&quot;/account/settings?show=all&amp;amp;amp;sort=asc&quot;&gt;View Settings&lt;/a&gt; ---&gt;\n\n&lt;!--- Given that a `userProfile` route has been configured in `config/routes.cfm` ---&gt;\n#linkTo(text=&quot;Joe's Profile&quot;, route=&quot;userProfile&quot;, userName=&quot;joe&quot;)#\n&lt;!--- Ouputs: &lt;a href=&quot;/user/joe&quot;&gt;Joe's Profile&lt;/a&gt; ---&gt;\n\n&lt;!--- Link to an external website ---&gt;\n#linkTo(text=&quot;ColdFusion Framework&quot;, href=&quot;http://cfwheels.org/&quot;)#\n&lt;!--- Ouputs: &lt;a href=&quot;http://cfwheels.org/&quot;&gt;ColdFusion Framework&lt;/a&gt; ---&gt;\n\n&lt;!--- Give the link `class` and `id` attributes ---&gt;\n#linkTo(text=&quot;Delete Post&quot;, action=&quot;delete&quot;, key=99, class=&quot;delete&quot;, id=&quot;delete-99&quot;)#\n&lt;!--- Ouputs: &lt;a class=&quot;delete&quot; href=&quot;/blog/delete/99&quot; id=&quot;delete-99&quot;&gt;Delete Post&lt;/a&gt; ---&gt;\n\n</code></pre>"},"hint":"Creates a link to another page in your application.\r\nPass in the name of a route to use your configured routes or a controller/action/key combination.\r\nNote: Pass any additional arguments like class, rel, and id, and the generated tag will also include those values as HTML attributes.\r\n\r\n","returntype":"string","slug":"controller.linkTo","parameters":[{"required":false,"hint":"The text content of the link.","name":"text","type":"string"},{"default":"","required":false,"hint":"Name of a route that you have configured in config/routes.cfm.","name":"route","type":"string"},{"default":"","required":false,"hint":"Name of the controller to include in the URL.","name":"controller","type":"string"},{"default":"","required":false,"hint":"Name of the action to include in the URL.","name":"action","type":"string"},{"default":"","required":false,"hint":"Key(s) to include in the URL.","name":"key","type":"any"},{"default":"","required":false,"hint":"Any additional parameters to be set in the query string (example: wheels=cool&x=y). Please note that CFWheels uses the & and = characters to split the parameters and encode them properly for you. However, if you need to pass in & or = as part of the value, then you need to encode them (and only them), example: a=cats%26dogs%3Dtrouble!&b=1.","name":"params","type":"string"},{"default":"","required":false,"hint":"Sets an anchor name to be appended to the path.","name":"anchor","type":"string"},{"default":true,"required":false,"hint":"If true, returns only the relative URL (no protocol, host name or port).","name":"onlyPath","type":"boolean"},{"default":"","required":false,"hint":"Set this to override the current host.","name":"host","type":"string"},{"default":"","required":false,"hint":"Set this to override the current protocol.","name":"protocol","type":"string"},{"default":0,"required":false,"hint":"Set this to override the current port number.","name":"port","type":"numeric"},{"required":false,"hint":"Pass a link to an external site here if you want to bypass the CFWheels routing system altogether and link to an external URL.","name":"href","type":"string"},{"default":true,"required":false,"hint":"Use this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to `true` to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to `attributes` to only encode attribute values and not tag content.","name":"encode","type":"any"}],"availableIn":["controller"],"name":"linkTo","tags":{"categoryClass":"linkfunctions","sectionClass":"viewhelpers","category":"Link Functions","section":"View Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>#mailTo(emailAddress=&quot;webmaster@yourdomain.com&quot;, name=&quot;Contact our Webmaster&quot;)#\n&lt;!--- Outputs: &lt;a href=&quot;mailto:webmaster@yourdomain.com&quot;&gt;Contact our Webmaster&lt;/a&gt; ---&gt;</code></pre>"},"hint":"Creates a <code>mailto</code> link tag to the specified email address, which is also used as the name of the link unless name is specified.\r\n\r\n","returntype":"string","slug":"controller.mailTo","parameters":[{"required":true,"hint":"The email address to link to.","name":"emailAddress","type":"string"},{"default":"","required":false,"hint":"A string to use as the link text (\"Joe\" or \"Support Department\", for example).","name":"name","type":"string"},{"default":true,"required":false,"hint":"Use this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to `true` to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to `attributes` to only encode attribute values and not tag content.","name":"encode","type":"any"}],"availableIn":["controller"],"name":"mailTo","tags":{"categoryClass":"linkfunctions","sectionClass":"viewhelpers","category":"Link Functions","section":"View Helpers"}},{"extended":{"hasExtended":false,"docs":""},"hint":"Returns the mapper object used to configure your application's routes. Usually you will use this method in <code>config/routes.cfm</code> to start chaining route mapping methods like <code>resources</code>, <code>namespace</code>, etc.\r\n\r\n","returntype":"struct","slug":"controller.mapper","parameters":[{"default":true,"required":false,"hint":"Whether to turn on RESTful routing or not. Not recommended to set. Will probably be removed in a future version of wheels, as RESTful routes are the default.","name":"restful","type":"boolean"},{"default":"[runtime expression]","required":false,"hint":"If not RESTful, then specify allowed routes. Not recommended to set. Will probably be removed in a future version of wheels, as RESTful routes are the default.","name":"methods","type":"boolean"},{"default":true,"required":false,"hint":"This is useful for providing formats via URL like `json`, `xml`, `pdf`, etc. Set to false to disable automatic .[format] generation for resource based routes","name":"mapFormat","type":"boolean"}],"availableIn":["controller","model","test","migrator","migration","tabledefinition"],"name":"mapper","tags":{"categoryClass":"routing","sectionClass":"configuration","category":"Routing","section":"Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Get the amount of the highest salary for all employees\nhighestSalary = model(&quot;employee&quot;).maximum(&quot;salary&quot;);\n\n// Get the amount of the highest salary for employees in a given department\nhighestSalary = model(&quot;employee&quot;).maximum(property=&quot;salary&quot;, where=&quot;departmentId=#params.key#&quot;);\n\n// Make sure a numeric value is always returned, even if no records are found to calculate the maximum for\nhighestSalary = model(&quot;employee&quot;).maximum(property=&quot;salary&quot;, where=&quot;salary &gt; #params.minSalary#&quot;, ifNull=0);</code></pre>"},"hint":"Calculates the maximum value for a given property.\r\nUses the SQL function <code>MAX</code>.\r\nIf no records can be found to perform the calculation on you can use the <code>ifNull</code> argument to decide what should be returned.\r\n\r\n","returntype":"any","slug":"model.maximum","parameters":[{"required":true,"hint":"Name of the property to get the highest value for (must be a property of a numeric data type).","name":"property","type":"string"},{"default":"","required":false,"hint":"Maps to the `WHERE` clause of the query (or `HAVING` when necessary). The following operators are supported: `=`, `!=`, `<>`, `<`, `<=`, `>`, `>=`, `LIKE`, `NOT LIKE`, `IN`, `NOT IN`, `IS NULL`, `IS NOT NULL`, `AND`, and `OR` (note that the key words need to be written in upper case). You can also use parentheses to group statements. You do not need to specify the table name(s); CFWheels will do that for you.","name":"where","type":"string"},{"default":"","required":false,"hint":"Associations that should be included in the query using `INNER` or `LEFT OUTER` joins (which join type that is used depends on how the association has been set up in your model). If all included associations are set on the current model, you can specify them in a list (e.g. `department,addresses,emails`). You can build more complex include strings by using parentheses when the association is set on an included model, like `album(artist(genre))`, for example. These complex `include` strings only work when `returnAs` is set to `query` though.","name":"include","type":"string"},{"default":true,"required":false,"name":"parameterize","type":"any"},{"default":"","required":false,"hint":"The value returned if no records are found. Common usage is to set this to `0` to make sure a numeric value is always returned instead of a blank string.","name":"ifNull","type":"any"},{"default":"false","required":false,"hint":"Set to `true` to include soft-deleted records in the queries that this method runs.","name":"includeSoftDeletes","type":"boolean"},{"required":false,"hint":"Maps to the `GROUP BY` clause of the query. You do not need to specify the table name(s); CFWheels will do that for you.","name":"group","type":"string"}],"availableIn":["model"],"name":"maximum","tags":{"categoryClass":"statisticsfunctions","sectionClass":"modelclass","category":"Statistics Functions","section":"Model Class"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;cfscript&gt;\n\nmapper()\n    // Create a route like `photos/1/preview`\n    .resources(name=&quot;photos&quot;, nested=true)\n        .member()\n            .get(&quot;preview&quot;)\n        .end()\n    .end()\n.end();\n\n&lt;/cfscript&gt;\n</code></pre>"},"hint":"Scope routes within a nested resource which require use of the primary key as part of the URL pattern;\r\nA member route will require an ID, because it acts on a member.\r\nphotos/1/preview is an example of a member route, because it acts on (and displays) a single object.\r\n\r\n","returntype":"struct","slug":"mapper.member","parameters":[],"availableIn":["mapper"],"name":"member","tags":{"categoryClass":"routing","sectionClass":"configuration","category":"Routing","section":"Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Migrate to a specific version\n// Returns a message with the result\nresult=application.wheels.migrator.migrateTo(version);\n</code></pre>"},"hint":"Migrates database to a specified version. Whilst you can use this in your application, the recommended useage is via either the CLI or the provided GUI interface\r\n\r\n","returntype":"string","slug":"migrator.migrateTo","parameters":[{"default":"","required":false,"hint":"The Database schema version to migrate to","name":"version","type":"string"}],"availableIn":["migrator"],"name":"migrateTo","tags":{"categoryClass":"generalfunctions","sectionClass":"migrator","category":"General Functions","section":"Migrator"}},{"extended":{"hasExtended":false,"docs":""},"hint":"Shortcut function to migrate to the latest version\r\n\r\n","returntype":"string","slug":"migrator.migrateToLatest","parameters":[],"availableIn":["migrator"],"name":"migrateToLatest","tags":{"categoryClass":"generalfunctions","sectionClass":"migrator","category":"General Functions","section":"Migrator"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Get the internally-stored MIME type for `xls`\nmimeType = mimeTypes(&quot;xls&quot;);\n\n// Get the internally-stored MIME type for a dynamic value. Fall back to a MIME type of `text/plain` if it's not found\nmimeType = mimeTypes(extension=params.type, fallback=&quot;text/plain&quot;);</code></pre>"},"hint":"Returns an associated MIME type based on a file extension.\r\n\r\n","returntype":"string","slug":"controller.mimeTypes","parameters":[{"required":true,"hint":"The extension to get the MIME type for.","name":"extension","type":"string"},{"default":"application/octet-stream","required":false,"hint":"The fallback MIME type to return.","name":"fallback","type":"string"}],"availableIn":["controller","model","test","migrator","migration","tabledefinition"],"name":"mimeTypes","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"globalhelpers","category":"Miscellaneous Functions","section":"Global Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Get the amount of the lowest salary for all employees\nlowestSalary = model(&quot;employee&quot;).minimum(&quot;salary&quot;);\n\n// Get the amount of the lowest salary for employees in a given department\nlowestSalary = model(&quot;employee&quot;).minimum(property=&quot;salary&quot;, where=&quot;departmentId=#params.key#&quot;);\n\n// Make sure a numeric amount is always returned, even when there were no records analyzed by the query\nlowestSalary = model(&quot;employee&quot;).minimum(property=&quot;salary&quot;, where=&quot;salary BETWEEN #params.min# AND #params.max#&quot;, ifNull=0);</code></pre>"},"hint":"Calculates the minimum value for a given property.\r\nUses the SQL function <code>MIN</code>.\r\nIf no records can be found to perform the calculation on you can use the <code>ifNull</code> argument to decide what should be returned.\r\n\r\n","returntype":"any","slug":"model.minimum","parameters":[{"required":true,"hint":"Name of the property to get the lowest value for (must be a property of a numeric data type).","name":"property","type":"string"},{"default":"","required":false,"hint":"Maps to the `WHERE` clause of the query (or `HAVING` when necessary). The following operators are supported: `=`, `!=`, `<>`, `<`, `<=`, `>`, `>=`, `LIKE`, `NOT LIKE`, `IN`, `NOT IN`, `IS NULL`, `IS NOT NULL`, `AND`, and `OR` (note that the key words need to be written in upper case). You can also use parentheses to group statements. You do not need to specify the table name(s); CFWheels will do that for you.","name":"where","type":"string"},{"default":"","required":false,"hint":"Associations that should be included in the query using `INNER` or `LEFT OUTER` joins (which join type that is used depends on how the association has been set up in your model). If all included associations are set on the current model, you can specify them in a list (e.g. `department,addresses,emails`). You can build more complex include strings by using parentheses when the association is set on an included model, like `album(artist(genre))`, for example. These complex `include` strings only work when `returnAs` is set to `query` though.","name":"include","type":"string"},{"default":true,"required":false,"hint":"Set to `true` to use `cfqueryparam` on all columns, or pass in a list of property names to use `cfqueryparam` on those only.","name":"parameterize","type":"any"},{"default":"","required":false,"hint":"The value returned if no records are found. Common usage is to set this to `0` to make sure a numeric value is always returned instead of a blank string.","name":"ifNull","type":"any"},{"default":"false","required":false,"hint":"Set to `true` to include soft-deleted records in the queries that this method runs.","name":"includeSoftDeletes","type":"boolean"},{"required":false,"hint":"Maps to the `GROUP BY` clause of the query. You do not need to specify the table name(s); CFWheels will do that for you.","name":"group","type":"string"}],"availableIn":["model"],"name":"minimum","tags":{"categoryClass":"statisticsfunctions","sectionClass":"modelclass","category":"Statistics Functions","section":"Model Class"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// This &quot;Tag&quot; version of the function accepts a `name` and `selected` instead of binding to a model object \n&lt;cfoutput&gt;\n    #minuteSelectTag(name=&quot;minuteOfMeeting&quot;, value=params.minuteOfMeeting)#\n&lt;/cfoutput&gt;\n\n// Only show 15-minute intervals \n&lt;cfoutput&gt;\n\t#minuteSelectTag(name=&quot;minuteOfMeeting&quot;, value=params.minuteOfMeeting, minuteStep=15)#\n&lt;/cfoutput&gt;</code></pre>"},"hint":"Builds and returns a string containing one <code>select</code> form control for the minutes of an hour based on the supplied name.\r\n\r\n","returntype":"string","slug":"controller.minuteSelectTag","parameters":[{"required":true,"hint":"Name to populate in tag's name attribute.","name":"name","type":"string"},{"default":"","required":false,"hint":"The day that should be selected initially.","name":"selected","type":"string"},{"default":1,"required":false,"hint":"Pass in 10 to only show minute 10, 20, 30, etc.","name":"minuteStep","type":"numeric"},{"default":false,"required":false,"hint":"Whether to include a blank option in the select form control. Pass true to include a blank line or a string that should represent what display text should appear for the empty value (for example, \"- Select One -\").","name":"includeBlank","type":"any"},{"default":"","required":false,"hint":"The label text to use in the form control.","name":"label","type":"string"},{"default":"around","required":false,"hint":"Whether to place the label before, after, or wrapped around the form control. Label text placement can be controlled using aroundLeft or aroundRight.","name":"labelPlacement","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control. Useful to wrap the form control with HTML tags.","name":"prepend","type":"string"},{"default":"","required":false,"hint":"String to append to the form control. Useful to wrap the form control with HTML tags.","name":"append","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control's label. Useful to wrap the form control with HTML tags.","name":"prependToLabel","type":"string"},{"default":"","required":false,"hint":"String to append to the form control's label. Useful to wrap the form control with HTML tags.","name":"appendToLabel","type":"string"},{"default":true,"required":false,"hint":"Use this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to `true` to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to `attributes` to only encode attribute values and not tag content.","name":"encode","type":"any"},{"default":"[runtime expression]","required":false,"name":"$now","type":"date"}],"availableIn":["controller"],"name":"minuteSelectTag","tags":{"categoryClass":"formtagfunctions","sectionClass":"viewhelpers","category":"Form Tag Functions","section":"View Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// The `model(&quot;author&quot;)` part of the code below gets a reference to the model from the application scope, and then the `findByKey` class level method is called on it\nauthorObject = model(&quot;author&quot;).findByKey(1);</code></pre>"},"hint":"Returns a reference to the requested model so that class level methods can be called on it.\r\n\r\n","returntype":"any","slug":"controller.model","parameters":[{"required":true,"hint":"Name of the model to get a reference to.","name":"name","type":"string"}],"availableIn":["controller","model","test","migrator","migration","tabledefinition"],"name":"model","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"globalhelpers","category":"Miscellaneous Functions","section":"Global Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// This &quot;Tag&quot; version of the function accepts a `name` and `selected` instead of binding to a model object \n&lt;cfoutput&gt;\n    #monthSelectTag(name=&quot;monthOfBirthday&quot;, selected=params.monthOfBirthday)#\n&lt;/cfoutput&gt;</code></pre>"},"hint":"Builds and returns a string containing a <code>select</code> form control for the months of the year based on the supplied name.\r\n\r\n","returntype":"string","slug":"controller.monthSelectTag","parameters":[{"required":true,"hint":"Name to populate in tag's name attribute.","name":"name","type":"string"},{"default":"","required":false,"hint":"The month that should be selected initially.","name":"selected","type":"string"},{"default":"names","required":false,"hint":"Pass in names, numbers, or abbreviations to control display.","name":"monthDisplay","type":"string"},{"default":"January,February,March,April,May,June,July,August,September,October,November,December","required":false,"hint":"[see:dateSelect].","name":"monthNames","type":"string"},{"default":"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec","required":false,"hint":"[see:dateSelect].","name":"monthAbbreviations","type":"string"},{"default":false,"required":false,"hint":"Whether to include a blank option in the select form control. Pass true to include a blank line or a string that should represent what display text should appear for the empty value (for example, \"- Select One -\").","name":"includeBlank","type":"any"},{"default":"","required":false,"hint":"The label text to use in the form control.","name":"label","type":"string"},{"default":"around","required":false,"hint":"Whether to place the label before, after, or wrapped around the form control. Label text placement can be controlled using aroundLeft or aroundRight.","name":"labelPlacement","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control. Useful to wrap the form control with HTML tags.","name":"prepend","type":"string"},{"default":"","required":false,"hint":"String to append to the form control. Useful to wrap the form control with HTML tags.","name":"append","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control's label. Useful to wrap the form control with HTML tags.","name":"prependToLabel","type":"string"},{"default":"","required":false,"hint":"String to append to the form control's label. Useful to wrap the form control with HTML tags.","name":"appendToLabel","type":"string"},{"default":true,"required":false,"hint":"Use this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to `true` to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to `attributes` to only encode attribute values and not tag content.","name":"encode","type":"any"},{"default":"[runtime expression]","required":false,"name":"$now","type":"date"}],"availableIn":["controller"],"name":"monthSelectTag","tags":{"categoryClass":"formtagfunctions","sectionClass":"viewhelpers","category":"Form Tag Functions","section":"View Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;cfscript&gt;\n\nmapper()\n    .namespace(&quot;api&quot;)\n        .namespace(&quot;v2&quot;)\n            // Route name:  apiV2Products\n            // Example URL: /api/v2/products/1234\n            // Controller:  api.v2.Products\n            .resources(&quot;products&quot;)\n        .end()\n\n        .namespace(&quot;v1&quot;)\n            // Route name:  apiV1Users\n            // Example URL: /api/v1/users\n            // Controller:  api.v1.Users\n            .get(name=&quot;users&quot;, to=&quot;users##index&quot;)\n        .end()\n    .end()\n\n    .namespace(name=&quot;foo&quot;, package=&quot;foos&quot;, path=&quot;foose&quot;)\n        // Route name:  fooBars\n        // Example URL: /foose/bars\n        // Controller:  foos.Bars\n        .post(name=&quot;bars&quot;, to=&quot;bars##create&quot;)\n    .end()\n.end();\n\n&lt;/cfscript&gt;</code></pre>"},"hint":"Scopes any the controllers for any routes configured within this block to a subfolder (package) and also adds the package name to the URL.\r\n\r\n","returntype":"struct","slug":"mapper.namespace","parameters":[{"required":true,"hint":"Name to prepend to child route names.","name":"name","type":"string"},{"default":"[runtime expression]","required":false,"hint":"Subfolder (package) to reference for controllers. This defaults to the value provided for `name`.","name":"package","type":"string"},{"default":"[runtime expression]","required":false,"hint":"Subfolder path to add to the URL.","name":"path","type":"string"}],"availableIn":["mapper"],"name":"namespace","tags":{"categoryClass":"routing","sectionClass":"configuration","category":"Routing","section":"Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// In `models/User.cfc`, allow for `groupEntitlements` to be saved and deleted through the `user` object.\nfunction config(){\n\thasMany(&quot;groupEntitlements&quot;);\n\tnestedProperties(association=&quot;groupEntitlements&quot;, allowDelete=true);\n}\n</code></pre>"},"hint":"Allows for nested objects, structs, and arrays to be set from params and other generated data.\r\n\r\n","returntype":"void","slug":"model.nestedProperties","parameters":[{"default":"","required":false,"hint":"The association (or list of associations) you want to allow to be set through the params. This argument is also aliased as `associations`.","name":"association","type":"string"},{"default":true,"required":false,"hint":"Whether to save the association(s) when the parent object is saved.","name":"autoSave","type":"boolean"},{"default":false,"required":false,"hint":"Set this to `true` to tell CFWheels to look for the property `_delete` in your model. If present and set to a value that evaluates to true, the model will be deleted when saving the parent.","name":"allowDelete","type":"boolean"},{"default":"","required":false,"hint":"Set this to a property on the object that you would like to sort by. The property should be numeric, should start with 1, and should be consecutive. Only valid with `hasMany` associations.","name":"sortProperty","type":"string"},{"default":"","required":false,"hint":"A list of properties that should not be blank. If any of the properties are blank, any CRUD operations will be rejected.","name":"rejectIfBlank","type":"string"}],"availableIn":["model"],"name":"nestedProperties","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"modelconfiguration","category":"Miscellaneous Functions","section":"Model Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Create a new author in memory (not saved to the database)\nnewAuthor = model(&quot;author&quot;).new();\n\n// Create a new author based on properties in a struct\nnewAuthor = model(&quot;author&quot;).new(params.authorStruct);\n\n// Create a new author by passing in named arguments\nnewAuthor = model(&quot;author&quot;).new(firstName=&quot;John&quot;, lastName=&quot;Doe&quot;);\n\n// If you have a `hasOne` or `hasMany` association setup from `customer` to `order`, you can do a scoped call. (The `newOrder` method below will call `model(&quot;order&quot;).new(customerId=aCustomer.id)` internally.)\naCustomer = model(&quot;customer&quot;).findByKey(params.customerId);\nanOrder = aCustomer.newOrder(shipping=params.shipping);</code></pre>"},"hint":"Creates a new object based on supplied <code>properties</code> and returns it.\r\nThe object is not saved to the database, it only exists in memory.\r\nProperty names and values can be passed in either using named arguments or as a struct to the <code>properties</code> argument.\r\n\r\n","returntype":"any","slug":"model.new","parameters":[{"default":"[runtime expression]","required":false,"hint":"The properties you want to set on the object (can also be passed in as named arguments).","name":"properties","type":"struct"},{"default":true,"required":false,"hint":"Set to `false` to disable callbacks for this method.","name":"callbacks","type":"boolean"},{"default":false,"required":false,"hint":"Set this to `true` to allow explicit assignment of `createdAt` or `updatedAt` properties","name":"allowExplicitTimestamps","type":"boolean"}],"availableIn":["model"],"name":"new","tags":{"categoryClass":"createfunctions","sectionClass":"modelclass","category":"Create Functions","section":"Model Class"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Obfuscate the primary key value `99`\nnewValue = obfuscateParam(99);</code></pre>"},"hint":"Obfuscates a value. Typically used for hiding primary key values when passed along in the URL.\r\n\r\n","returntype":"string","slug":"controller.obfuscateParam","parameters":[{"required":true,"hint":"The value to obfuscate.","name":"param","type":"any"}],"availableIn":["controller","model","test","migrator","migration","tabledefinition"],"name":"obfuscateParam","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"globalhelpers","category":"Miscellaneous Functions","section":"Global Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// This will only provide the `html` type and will ignore what was defined in the call to `provides()` in the `config()` function\nonlyProvides(&quot;html&quot;);</code></pre>"},"hint":"Use this in an individual controller action to define which formats the action will respond with.\r\nThis can be used to define provides behavior in individual actions or to override a global setting set with <code>provides</code> in the controller's <code>config()</code>.\r\n\r\n","returntype":"void","slug":"controller.onlyProvides","parameters":[{"default":"","required":false,"hint":"Formats to instruct the controller to provide. Valid values are `html` (the default), `xml`, `json`, `csv`, `pdf`, and `xls`.","name":"formats","type":"string"},{"default":"[runtime expression]","required":false,"hint":"Name of action, defaults to current.","name":"action","type":"string"}],"availableIn":["controller"],"name":"onlyProvides","tags":{"categoryClass":"providesfunctions","sectionClass":"controller","category":"Provides Functions","section":"Controller"}},{"extended":{"hasExtended":false,"docs":""},"hint":"This method is not designed to be called directly from your code, but provides functionality for dynamic finders such as <code>findOneByEmail()</code>\r\n\r\n","returntype":"any","slug":"model.onMissingMethod","parameters":[{"required":true,"name":"missingMethodName","type":"string"},{"required":true,"name":"missingMethodArguments","type":"struct"}],"availableIn":["model"],"name":"onMissingMethod","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"modelclass","category":"Miscellaneous Functions","section":"Model Class"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;cfscript&gt;\n\nmapper()\n    .package(&quot;public&quot;)\n        // Example URL: /products/1234\n        // Controller:  public.Products\n        .resources(&quot;products&quot;)\n    .end()\n\n    // Example URL: /users/4321\n    // Controller:  Users\n    .resources(name=&quot;users&quot;, nested=true)\n        // Calling `package` here is useful to scope nested routes for the `users`\n        // resource into a subfolder.\n        .package(&quot;users&quot;)\n            // Example URL: /users/4321/profile\n            // Controller:  users.Profiles\n            .resource(&quot;profile&quot;)\n        .end()\n    .end()\n.end();\n\n&lt;/cfscript&gt;</code></pre>"},"hint":"Scopes any the controllers for any routes configured within this block to a subfolder (package) without adding the package name to the URL.\r\n\r\n","returntype":"struct","slug":"mapper.package","parameters":[{"required":true,"hint":"Name to prepend to child route names.","name":"name","type":"string"},{"default":"[runtime expression]","required":false,"hint":"Subfolder (package) to reference for controllers. This defaults to the value provided for `name`.","name":"package","type":"string"}],"availableIn":["mapper"],"name":"package","tags":{"categoryClass":"routing","sectionClass":"configuration","category":"Routing","section":"Configuration"}},{"extended":{"hasExtended":false,"docs":""},"hint":"Executes once before this package's first test case.\r\n\r\n","returntype":"any","slug":"test.packageSetup","parameters":[],"availableIn":["test"],"name":"packageSetup","tags":{"categoryClass":"callbackfunctions","sectionClass":"testmodelconfiguration","category":"Callback Functions","section":"Test Model Configuration"}},{"extended":{"hasExtended":false,"docs":""},"hint":"Executes once after this package's last test case.\r\n\r\n","returntype":"any","slug":"test.packageTeardown","parameters":[],"availableIn":["test"],"name":"packageTeardown","tags":{"categoryClass":"callbackfunctions","sectionClass":"testmodelconfiguration","category":"Callback Functions","section":"Test Model Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>allAuthors = model(&quot;author&quot;).findAll(page=1, perPage=25, order=&quot;lastName&quot;, handle=&quot;authorsData&quot;);\npaginationData = pagination(&quot;authorsData&quot;);\n\n#pagination().currentPage#\n#pagination().totalPages#\n#pagination().totalRecords#</code></pre>"},"hint":"Returns a struct with information about the specificed paginated query.\r\nThe keys that will be included in the struct are <code>currentPage</code>, <code>totalPages</code> and <code>totalRecords</code>.\r\n\r\n","returntype":"struct","slug":"controller.pagination","parameters":[{"default":"query","required":false,"hint":"The handle given to the query to return pagination information for.","name":"handle","type":"string"}],"availableIn":["controller","model","test","migrator","migration","tabledefinition"],"name":"pagination","tags":{"categoryClass":"paginationfunctions","sectionClass":"controller","category":"Pagination Functions","section":"Controller"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>//--------------------------------------------------------------------\n// Example 1: List authors page by page, 25 at a time\n\n// Controller code\nparam name=&quot;params.page&quot; type=&quot;integer&quot; default=&quot;1&quot;;\nauthors = model(&quot;author&quot;).findAll(page=params.page, perPage=25, order=&quot;lastName&quot;);\n\n// View code\n&lt;ul&gt;\n    &lt;cfoutput query=&quot;authors&quot;&gt;\n        &lt;li&gt;#EncodeForHtml(firstName)# #EncodeForHtml(lastName)#&lt;/li&gt;\n    &lt;/cfoutput&gt;\n&lt;/ul&gt;\n\n&lt;cfoutput&gt;#paginationLinks(route=&quot;authors&quot;)#&lt;/cfoutput&gt;\n\n\n//--------------------------------------------------------------------\n// Example 2: Using the same model call above, show all authors with a\n// window size of 5\n\n// View code\n&lt;cfoutput&gt;#paginationLinks(route=&quot;authors&quot;, windowSize=5)#&lt;/cfoutput&gt;\n\n\n//--------------------------------------------------------------------\n// Example 3: If more than one paginated query is being run, then you\n// need to reference the correct `handle` in the view\n\n// Controller code\nauthors = model(&quot;author&quot;).findAll(handle=&quot;authQuery&quot;, page=5, order=&quot;id&quot;);\n\n// View code\n&lt;ul&gt;\n    &lt;cfoutput&gt;\n        #paginationLinks(\n            route=&quot;authors&quot;,\n            handle=&quot;authQuery&quot;,\n            prependToLink=&quot;&lt;li&gt;&quot;,\n            appendToLink=&quot;&lt;/li&gt;&quot;\n        )#\n    &lt;/cfoutput&gt;\n&lt;/ul&gt;\n\n\n//--------------------------------------------------------------------\n// Example 4: Call to `paginationLinks` using routes\n\n// Route setup in config/routes.cfm\nmapper()\n    .get(name=&quot;paginatedCommentListing&quot;, pattern=&quot;blog/[year]/[month]/[day]/[page]&quot;, to=&quot;blogs##stats&quot;)\n    .get(name=&quot;commentListing&quot;, pattern=&quot;blog/[year]/[month]/[day]&quot;, to=&quot;blogs##stats&quot;)\n.end();\n\n// Controller code\nparam name=&quot;params.page&quot; type=&quot;integer&quot; default=&quot;1&quot;;\ncomments = model(&quot;comment&quot;).findAll(page=params.page, order=&quot;createdAt&quot;);\n\n// View code\n&lt;ul&gt;\n    &lt;cfoutput&gt;\n        #paginationLinks(\n            route=&quot;paginatedCommentListing&quot;,\n            year=2009,\n            month=&quot;feb&quot;,\n            day=10\n        )#\n    &lt;/cfoutput&gt;\n&lt;/ul&gt;\n</code></pre>"},"hint":"Builds and returns a string containing links to pages based on a paginated query.\r\nUses <code>linkTo()</code> internally to build the link, so you need to pass in a route name or a controller/action/key combination.\r\nAll other <code>linkTo()</code> arguments can be supplied as well, in which case they are passed through directly to <code>linkTo()</code>.\r\nIf you have paginated more than one query in the controller, you can use the handle argument to reference them. (Don't forget to pass in a handle to the <code>findAll()</code> function in your controller first.)\r\n\r\n","returntype":"string","slug":"controller.paginationLinks","parameters":[{"default":2,"required":false,"hint":"The number of page links to show around the current page.","name":"windowSize","type":"numeric"},{"default":true,"required":false,"hint":"Whether or not links to the first and last page should always be displayed.","name":"alwaysShowAnchors","type":"boolean"},{"default":" ... ","required":false,"hint":"String to place next to the anchors on either side of the list.","name":"anchorDivider","type":"string"},{"default":false,"required":false,"hint":"Whether or not the current page should be linked to.","name":"linkToCurrentPage","type":"boolean"},{"default":"","required":false,"hint":"String or HTML to be prepended before result.","name":"prepend","type":"string"},{"default":"","required":false,"hint":"String or HTML to be appended after result.","name":"append","type":"string"},{"default":"","required":false,"hint":"String or HTML to be prepended before each page number.","name":"prependToPage","type":"string"},{"default":false,"required":false,"name":"addActiveClassToPrependedParent","type":"boolean"},{"default":true,"required":false,"hint":"Whether or not to prepend the prependToPage string on the first page in the list.","name":"prependOnFirst","type":"boolean"},{"default":true,"required":false,"hint":"Whether or not to prepend the prependToPage string on the anchors.","name":"prependOnAnchor","type":"boolean"},{"default":"","required":false,"hint":"String or HTML to be appended after each page number.","name":"appendToPage","type":"string"},{"default":true,"required":false,"hint":"Whether or not to append the appendToPage string on the last page in the list.","name":"appendOnLast","type":"boolean"},{"default":true,"required":false,"hint":"Whether or not to append the appendToPage string on the anchors.","name":"appendOnAnchor","type":"boolean"},{"default":"","required":false,"hint":"Class name for the current page number (if linkToCurrentPage is true, the class name will go on the a element. If not, a span element will be used).","name":"classForCurrent","type":"string"},{"default":"query","required":false,"hint":"The handle given to the query that the pagination links should be displayed for.","name":"handle","type":"string"},{"default":"page","required":false,"hint":"The name of the param that holds the current page number.","name":"name","type":"string"},{"default":false,"required":false,"hint":"Will show a single page when set to true. (The default behavior is to return an empty string when there is only one page in the pagination).","name":"showSinglePage","type":"boolean"},{"default":true,"required":false,"hint":"Decides whether to link the page number as a param or as part of a route. (The default behavior is true).","name":"pageNumberAsParam","type":"boolean"},{"default":true,"required":false,"hint":"Use this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to `true` to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to `attributes` to only encode attribute values and not tag content.","name":"encode","type":"any"}],"availableIn":["controller"],"name":"paginationLinks","tags":{"categoryClass":"linkfunctions","sectionClass":"viewhelpers","category":"Link Functions","section":"View Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Provide a `label` and the required `objectName` and `property`\n&lt;cfoutput&gt;\n    #passwordField(label=&quot;Password&quot;, objectName=&quot;user&quot;, property=&quot;password&quot;)#\n&lt;/cfoutput&gt;\n\n// Display fields for passwords provided by the `passwords` association and nested properties\n&lt;fieldset&gt;\n\t&lt;legend&gt;Passwords&lt;/legend&gt;\n\t&lt;cfloop from=&quot;1&quot; to=&quot;#ArrayLen(user.passwords)#&quot; index=&quot;i&quot;&gt;\n\t\t#passwordField(label=&quot;Password ##i#&quot;, objectName=&quot;user&quot;, association=&quot;passwords&quot;, position=i, property=&quot;password&quot;)#\n\t&lt;/cfloop&gt;\n&lt;/fieldset&gt;</code></pre>"},"hint":"Builds and returns a string containing a password field form control based on the supplied objectName and property.\r\nNote: Pass any additional arguments like class, rel, and id, and the generated tag will also include those values as HTML attributes.\r\n\r\n","returntype":"string","slug":"controller.passwordField","parameters":[{"required":true,"hint":"The variable name of the object to build the form control for.","name":"objectName","type":"any"},{"required":true,"hint":"The name of the property to use in the form control.","name":"property","type":"string"},{"required":false,"hint":"The name of the association that the property is located on. Used for building nested forms that work with nested properties. If you are building a form with deep nesting, simply pass in a list to the nested object, and CFWheels will figure it out.","name":"association","type":"string"},{"required":false,"hint":"The position used when referencing a hasMany relationship in the association argument. Used for building nested forms that work with nested properties. If you are building a form with deep nestings, simply pass in a list of positions, and CFWheels will figure it out.","name":"position","type":"string"},{"default":"useDefaultLabel","required":false,"hint":"The label text to use in the form control.","name":"label","type":"string"},{"default":"around","required":false,"hint":"Whether to place the label before, after, or wrapped around the form control. Label text placement can be controlled using aroundLeft or aroundRight.","name":"labelPlacement","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control. Useful to wrap the form control with HTML tags.","name":"prepend","type":"string"},{"default":"","required":false,"hint":"String to append to the form control. Useful to wrap the form control with HTML tags.","name":"append","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control's label. Useful to wrap the form control with HTML tags.","name":"prependToLabel","type":"string"},{"default":"","required":false,"hint":"String to append to the form control's label. Useful to wrap the form control with HTML tags.","name":"appendToLabel","type":"string"},{"default":"span","required":false,"hint":"HTML tag to wrap the form control with when the object contains errors.","name":"errorElement","type":"string"},{"default":"field-with-errors","required":false,"hint":"The class name of the HTML tag that wraps the form control when there are errors.","name":"errorClass","type":"string"},{"default":true,"required":false,"hint":"Use this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to `true` to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to `attributes` to only encode attribute values and not tag content.","name":"encode","type":"any"}],"availableIn":["controller"],"name":"passwordField","tags":{"categoryClass":"formobjectfunctions","sectionClass":"viewhelpers","category":"Form Object Functions","section":"View Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Basic usage usually involves a `label`, `name`, and `value` \n&lt;cfoutput&gt;\n    #passwordFieldTag(label=&quot;Password&quot;, name=&quot;password&quot;, value=params.password)#\n&lt;/cfoutput&gt;</code></pre>"},"hint":"Builds and returns a string containing a password field form control based on the supplied name.\r\nNote: Pass any additional arguments like <code>class</code>, <code>rel</code>, and <code>id</code>, and the generated tag will also include those values as HTML attributes.\r\n\r\n","returntype":"string","slug":"controller.passwordFieldTag","parameters":[{"required":true,"hint":"Name to populate in tag's name attribute.","name":"name","type":"string"},{"default":"","required":false,"hint":"Value to populate in tag's value attribute.","name":"value","type":"string"},{"default":"","required":false,"hint":"The label text to use in the form control.","name":"label","type":"string"},{"default":"around","required":false,"hint":"Whether to place the label before, after, or wrapped around the form control. Label text placement can be controlled using aroundLeft or aroundRight.","name":"labelPlacement","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control. Useful to wrap the form control with HTML tags.","name":"prepend","type":"string"},{"default":"","required":false,"hint":"String to append to the form control. Useful to wrap the form control with HTML tags.","name":"append","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control's label. Useful to wrap the form control with HTML tags.","name":"prependToLabel","type":"string"},{"default":"","required":false,"hint":"String to append to the form control's label. Useful to wrap the form control with HTML tags.","name":"appendToLabel","type":"string"},{"default":true,"required":false,"hint":"Use this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to `true` to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to `attributes` to only encode attribute values and not tag content.","name":"encode","type":"any"}],"availableIn":["controller"],"name":"passwordFieldTag","tags":{"categoryClass":"formtagfunctions","sectionClass":"viewhelpers","category":"Form Tag Functions","section":"View Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;cfscript&gt;\n\nmapper()\n    // Route name:  ghostStory\n    // Example URL: /ghosts/666/stories/616\n    // Controller:  Stories\n    // Action:      update\n    .patch(name=&quot;ghostStory&quot;, pattern=&quot;ghosts/[ghostKey]/stories/[key]&quot;, to=&quot;stories##update&quot;)\n\n    // Route name:  goblins\n    // Example URL: /goblins\n    // Controller:  Goblins\n    // Action:      update\n    .patch(name=&quot;goblins&quot;, controller=&quot;goblins&quot;, action=&quot;update&quot;)\n\n    // Route name:  heartbeat\n    // Example URL: /heartbeat\n    // Controller:  Sessions\n    // Action:      update\n    .patch(name=&quot;heartbeat&quot;, to=&quot;sessions##update&quot;)\n\n    // Route name:  usersPreferences\n    // Example URL: /preferences\n    // Controller:  users.Preferences\n    // Action:      update\n    .patch(name=&quot;preferences&quot;, to=&quot;preferences##update&quot;, package=&quot;users&quot;)\n\n    // Route name:  orderShipment\n    // Example URL: /shipments/5432\n    // Controller:  orders.Shipments\n    // Action:      update\n    .patch(\n        name=&quot;shipment&quot;,\n        pattern=&quot;shipments/[key]&quot;,\n        to=&quot;shipments##update&quot;,\n        package=&quot;orders&quot;\n    )\n\n    // Example scoping within a nested resource\n    .resources(name=&quot;subscribers&quot;, nested=true)\n        // Route name:  launchSubscribers\n        // Example URL: /subscribers/3209/launch\n        // Controller:  Subscribers\n        // Action:      launch\n        .patch(name=&quot;launch&quot;, to=&quot;subscribers##update&quot;, on=&quot;collection&quot;)\n\n        // Route name:  discontinueSubscriber\n        // Example URL: /subscribers/2251/discontinue\n        // Controller:  Subscribers\n        // Action:      discontinue\n        .patch(name=&quot;discontinue&quot;, to=&quot;subscribers##discontinue&quot;, on=&quot;member&quot;)\n    .end()\n.end();\n\n&lt;/cfscript&gt;</code></pre>"},"hint":"Create a route that matches a URL requiring an HTTP <code>PATCH</code> method. We recommend using this matcher to expose actions that update database records.\r\n\r\n","returntype":"struct","slug":"mapper.patch","parameters":[{"required":false,"hint":"Camel-case name of route to reference when build links and form actions (e.g., `blogPost`).","name":"name","type":"string"},{"required":false,"hint":"Overrides the URL pattern that will match the route. The default value is a dasherized version of `name` (e.g., a `name` of `blogPost` generates a pattern of `blog-post`).","name":"pattern","type":"string"},{"required":false,"hint":"Set `controller##action` combination to map the route to. You may use either this argument or a combination of `controller` and `action`.","name":"to","type":"string"},{"required":false,"hint":"Map the route to a given controller. This must be passed along with the `action` argument.","name":"controller","type":"string"},{"required":false,"hint":"Map the route to a given action within the `controller`. This must be passed along with the `controller` argument.","name":"action","type":"string"},{"required":false,"hint":"Indicates a subfolder that the controller will be referenced from (but not added to the URL pattern). For example, if you set this to `admin`, the controller will be located at `admin/YourController.cfc`, but the URL path will not contain `admin/`.","name":"package","type":"string"},{"required":false,"hint":"If this route is within a nested resource, you can set this argument to `member` or `collection`. A `member` route contains a reference to the resource's `key`, while a `collection` route does not.","name":"on","type":"string"},{"required":false,"hint":"Redirect via 302 to this URL when this route is matched. Has precedence over controller/action. Use either an absolute link like `/about/`, or a full canonical link.","name":"redirect","type":"string"}],"availableIn":["mapper"],"name":"patch","tags":{"categoryClass":"routing","sectionClass":"configuration","category":"Routing","section":"Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Check if the Scaffold plugin is installed \n&lt;cfif ListFindNoCase(&quot;scaffold&quot;, pluginNames())&gt;\n    // do something cool \n&lt;/cfif&gt;</code></pre>"},"hint":"Returns a list of the names of all installed plugins.\r\n\r\n","returntype":"string","slug":"controller.pluginNames","parameters":[],"availableIn":["controller","model","test","migrator","migration","tabledefinition"],"name":"pluginNames","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"globalhelpers","category":"Miscellaneous Functions","section":"Global Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Pluralize a word, will result in &quot;people&quot; \n#pluralize(&quot;person&quot;)#\n\n// Pluralize based on the count passed in \nYour search returned #pluralize(word=&quot;person&quot;, count=users.RecordCount)#</code></pre>"},"hint":"Returns the plural form of the passed in word. Can also pluralize a word based on a value passed to the <code>count</code> argument. CFWheels stores a list of words that are the same in both singular and plural form (e.g. \"equipment\", \"information\") and words that don't follow the regular pluralization rules (e.g. \"child\" / \"children\", \"foot\" / \"feet\"). Use <code>get(\"uncountables\")</code> / <code>set(\"uncountables\", newList)</code> and <code>get(\"irregulars\")</code> / <code>set(\"irregulars\", newList)</code> to modify them to suit your needs.\r\n\r\n","returntype":"string","slug":"controller.pluralize","parameters":[{"required":true,"hint":"The word to pluralize.","name":"word","type":"string"},{"default":"-1","required":false,"hint":"Pluralization will occur when this value is not 1.","name":"count","type":"numeric"},{"default":"true","required":false,"hint":"Will return count prepended to the pluralization when true and count is not -1.","name":"returnCount","type":"boolean"}],"availableIn":["controller","model","test","mapper","migrator","migration","tabledefinition"],"name":"pluralize","tags":{"categoryClass":"stringfunctions","sectionClass":"globalhelpers","category":"String Functions","section":"Global Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;cfscript&gt;\n\nmapper()\n    // Route name:  widgets\n    // Example URL: /sites/918/widgets\n    // Controller:  Widgets\n    // Action:      create\n    .post(name=&quot;widgets&quot;, pattern=&quot;sites/[siteKey]/widgets&quot;, to=&quot;widgets##create&quot;)\n\n    // Route name:  wadgets\n    // Example URL: /wadgets\n    // Controller:  Wadgets\n    // Action:      create\n    .post(name=&quot;wadgets&quot;, controller=&quot;wadgets&quot;, action=&quot;create&quot;)\n\n    // Route name:  authenticate\n    // Example URL: /oauth/token.json\n    // Controller:  Tokens\n    // Action:      create\n    .post(name=&quot;authenticate&quot;, pattern=&quot;oauth/token.json&quot;, to=&quot;tokens##create&quot;)\n\n    // Route name:  usersPreferences\n    // Example URL: /preferences\n    // Controller:  users.Preferences\n    // Action:      create\n    .post(name=&quot;preferences&quot;, to=&quot;preferences##create&quot;, package=&quot;users&quot;)\n\n    // Route name:  extranetOrders\n    // Example URL: /buy-now/orders\n    // Controller:  extranet.Orders\n    // Action:      create\n    .post(\n        name=&quot;orders&quot;,\n        pattern=&quot;buy-now/orders&quot;,\n        to=&quot;orders##create&quot;,\n        package=&quot;extranet&quot;\n    )\n\n    // Example scoping within a nested resource\n    .resources(name=&quot;customers&quot;, nested=true)\n        // Route name:  leadsCustomers\n        // Example URL: /customers/leads\n        // Controller:  Leads\n        // Action:      create\n        .post(name=&quot;leads&quot;, to=&quot;leads##create&quot;, on=&quot;collection&quot;)\n\n        // Route name:  cancelCustomer\n        // Example URL: /customers/3209/cancel\n        // Controller:  Cancellations\n        // Action:      create\n        .post(name=&quot;cancel&quot;, to=&quot;cancellations##create&quot;, on=&quot;member&quot;)\n    .end()\n.end();\n\n&lt;/cfscript&gt;</code></pre>"},"hint":"Create a route that matches a URL requiring an HTTP <code>POST</code> method. We recommend using this matcher to expose actions that create database records.\r\n\r\n","returntype":"struct","slug":"mapper.post","parameters":[{"required":false,"hint":"Camel-case name of route to reference when build links and form actions (e.g., `blogPosts`).","name":"name","type":"string"},{"required":false,"hint":"Overrides the URL pattern that will match the route. The default value is a dasherized version of `name` (e.g., a `name` of `blogPosts` generates a pattern of `blog-posts`).","name":"pattern","type":"string"},{"required":false,"hint":"Set `controller##action` combination to map the route to. You may use either this argument or a combination of `controller` and `action`.","name":"to","type":"string"},{"required":false,"hint":"Map the route to a given controller. This must be passed along with the `action` argument.","name":"controller","type":"string"},{"required":false,"hint":"Map the route to a given action within the `controller`. This must be passed along with the `controller` argument.","name":"action","type":"string"},{"required":false,"hint":"Indicates a subfolder that the controller will be referenced from (but not added to the URL pattern). For example, if you set this to `admin`, the controller will be located at `admin/YourController.cfc`, but the URL path will not contain `admin/`.","name":"package","type":"string"},{"required":false,"hint":"If this route is within a nested resource, you can set this argument to `member` or `collection`. A `member` route contains a reference to the resource's `key`, while a `collection` route does not.","name":"on","type":"string"},{"required":false,"hint":"Redirect via 302 to this URL when this route is matched. Has precedence over controller/action. Use either an absolute link like `/about/`, or a full canonical link.","name":"redirect","type":"string"}],"availableIn":["mapper"],"name":"post","tags":{"categoryClass":"routing","sectionClass":"configuration","category":"Routing","section":"Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Get the name of the primary key of the table mapped to the `employee` model (which is the `employees` table by default)\nkeyName = model(&quot;employee&quot;).primaryKey();</code></pre>"},"hint":"Returns the name of the primary key for this model's table.\r\nThis is determined through database introspection.\r\nIf composite primary keys have been used, they will both be returned in a list.\r\nThis function is also aliased as <code>primaryKeys()</code>.\r\n\r\n","returntype":"string","slug":"model.primaryKey","parameters":[{"default":0,"required":false,"hint":"If you are accessing a composite primary key, pass the position of a single key to fetch.","name":"position","type":"numeric"}],"availableIn":["model"],"name":"primaryKey","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"modelclass","category":"Miscellaneous Functions","section":"Model Class"}},{"extended":{"hasExtended":false,"docs":""},"hint":"Adds a primary key definition to the table. this method also allows for multiple primary keys.\r\n\r\n","returntype":"any","slug":"tabledefinition.primaryKey","parameters":[{"required":true,"name":"name","type":"string"},{"default":"integer","required":false,"name":"type","type":"string"},{"default":"false","required":false,"name":"autoIncrement","type":"boolean"},{"required":false,"name":"limit","type":"numeric"},{"required":false,"name":"precision","type":"numeric"},{"required":false,"name":"scale","type":"numeric"},{"required":false,"name":"references","type":"string"},{"default":"","required":false,"name":"onUpdate","type":"string"},{"default":"","required":false,"name":"onDelete","type":"string"}],"availableIn":["tabledefinition"],"name":"primaryKey","tags":{"categoryClass":"tabledefinitionfunctions","sectionClass":"migrator","category":"Table Definition Functions","section":"Migrator"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Get a list of the names of the primary keys in the table mapped to the `employee` model (which is the `employees` table by default)\nkeyNames = model(&quot;employee&quot;).primaryKeys();</code></pre>"},"hint":"Alias for <code>primaryKey()</code>.\r\nUse this for better readability when you're accessing multiple primary keys.\r\n\r\n","returntype":"string","slug":"model.primaryKeys","parameters":[{"default":0,"required":false,"hint":"If you are accessing a composite primary key, pass the position of a single key to fetch.","name":"position","type":"numeric"}],"availableIn":["model"],"name":"primaryKeys","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"modelclass","category":"Miscellaneous Functions","section":"Model Class"}},{"extended":{"hasExtended":false,"docs":""},"hint":"Process the specified action of the controller.\r\nThis is exposed in the API primarily for testing purposes; you would not usually call it directly unless in the test suite.\r\n\r\n","returntype":"boolean","slug":"controller.processAction","parameters":[{"default":true,"required":false,"hint":"Set to `before` to only execute \"before\" filters, `after` to only execute \"after\" filters or `false` to skip all filters. This argument is generally inherited from the `processRequest` function during unit test execution.","name":"includeFilters","type":"string"}],"availableIn":["controller"],"name":"processAction","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"controller","category":"Miscellaneous Functions","section":"Controller"}},{"extended":{"hasExtended":false,"docs":""},"hint":"Creates a controller and calls an action on it.\r\nWhich controller and action that's called is determined by the params passed in.\r\nReturns the result of the request either as a string or in a struct with <code>body</code>, <code>emails</code>, <code>files</code>, <code>flash</code>, <code>redirect</code>, <code>status</code>, and <code>type</code>.\r\nPrimarily used for testing purposes.\r\n\r\n","returntype":"any","slug":"controller.processRequest","parameters":[{"required":true,"hint":"The params struct to use in the request (make sure that at least `controller` and `action` are set).","name":"params","type":"struct"},{"default":"get","required":false,"hint":"The HTTP method to use in the request (`get`, `post` etc).","name":"method","type":"string"},{"default":"","required":false,"hint":"Pass in `struct` to return all information about the request instead of just the final output (`body`).","name":"returnAs","type":"string"},{"default":false,"required":false,"hint":"Pass in `true` to roll back all database transactions made during the request.","name":"rollback","type":"string"},{"default":true,"required":false,"hint":"Set to `before` to only execute \"before\" filters, `after` to only execute \"after\" filters or `false` to skip all filters.","name":"includeFilters","type":"string"}],"availableIn":["controller","model","test","migrator","migration","tabledefinition"],"name":"processRequest","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"controller","category":"Miscellaneous Functions","section":"Controller"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Get a structure of all the properties for an object\nuser = model(&quot;user&quot;).findByKey(1);\nprops = user.properties();</code></pre>"},"hint":"Returns a structure of all the properties with their names as keys and the values of the property as values.\r\n\r\n","returntype":"struct","slug":"model.properties","parameters":[{"default":true,"required":false,"hint":"Whether to return nested properties or not.","name":"returnIncluded","type":"boolean"}],"availableIn":["model"],"name":"properties","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"modelobject","category":"Miscellaneous Functions","section":"Model Object"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Tell Wheels that when we are referring to `firstName` in the CFML code, it should translate to the `STR_USERS_FNAME` column when interacting with the database instead of the default (which would be the `firstname` column)\nproperty(name=&quot;firstName&quot;, column=&quot;STR_USERS_FNAME&quot;);\n\n// Tell Wheels that when we are referring to `fullName` in the CFML code, it should concatenate the `STR_USERS_FNAME` and `STR_USERS_LNAME` columns\nproperty(name=&quot;fullName&quot;, sql=&quot;STR_USERS_FNAME + ' ' + STR_USERS_LNAME&quot;);\n\n// Tell Wheels that when displaying error messages or labels for form fields, we want to use `First name(s)` as the label for the `STR_USERS_FNAME` column\nproperty(name=&quot;firstName&quot;, label=&quot;First name(s)&quot;);\n\n// Tell Wheels that when creating new objects, we want them to be auto-populated with a `firstName` property of value `Dave`\nproperty(name=&quot;firstName&quot;, defaultValue=&quot;Dave&quot;);</code></pre>"},"hint":"Use this method to map an object property to either a table column with a different name than the property or to a SQL expression.\r\nYou only need to use this method when you want to override the default object relational mapping that CFWheels performs.\r\n\r\n","returntype":"void","slug":"model.property","parameters":[{"required":true,"hint":"The name that you want to use for the column or SQL function result in the CFML code.","name":"name","type":"string"},{"default":"","required":false,"hint":"The name of the column in the database table to map the property to.","name":"column","type":"string"},{"default":"","required":false,"hint":"An SQL expression to use to calculate the property value.","name":"sql","type":"string"},{"default":"","required":false,"hint":"A custom label for this property to be referenced in the interface and error messages.","name":"label","type":"string"},{"required":false,"hint":"A default value for this property.","name":"defaultValue","type":"string"},{"default":"true","required":false,"hint":"Whether to include this property by default in SELECT statements","name":"select","type":"boolean"},{"default":"char","required":false,"hint":"Specify the column dataType for this property","name":"dataType","type":"string"},{"required":false,"hint":"Enable / disable automatic validations for this property.","name":"automaticValidations","type":"boolean"}],"availableIn":["model"],"name":"property","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"modelconfiguration","category":"Miscellaneous Functions","section":"Model Configuration"}},{"extended":{"hasExtended":false,"docs":""},"hint":"Returns <code>true</code> if the specified property doesn't exist on the model or is an empty string.\r\nThis method is the inverse of <code>propertyIsPresent()</code>.\r\n\r\n","returntype":"boolean","slug":"model.propertyIsBlank","parameters":[{"required":true,"hint":"Name of property to inspect.","name":"property","type":"string"}],"availableIn":["model"],"name":"propertyIsBlank","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"modelobject","category":"Miscellaneous Functions","section":"Model Object"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Get an object, set a value and then see if the property exists\nemployee = model(&quot;employee&quot;).new();\nemployee.firstName = &quot;dude&quot;;\nreturn employee.propertyIsPresent(&quot;firstName&quot;); // Returns true\n\nemployee.firstName = &quot;&quot;&gt;\nreturn employee.propertyIsPresent(&quot;firstName&quot;); // Returns false</code></pre>"},"hint":"Returns <code>true</code> if the specified property exists on the model and is not a blank string.\r\n\r\n","returntype":"boolean","slug":"model.propertyIsPresent","parameters":[{"required":true,"hint":"Name of property to inspect.","name":"property","type":"string"}],"availableIn":["model"],"name":"propertyIsPresent","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"modelobject","category":"Miscellaneous Functions","section":"Model Object"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Get a list of the property names in use in the user model\npropNames = model(&quot;user&quot;).propertyNames();</code></pre>"},"hint":"Returns a list of property names ordered by their respective column's ordinal position in the database table.\r\nAlso includes calculated property names that will be generated by the CFWheels ORM.\r\n\r\n","returntype":"string","slug":"model.propertyNames","parameters":[],"availableIn":["model"],"name":"propertyNames","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"modelclass","category":"Miscellaneous Functions","section":"Model Class"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// In `models/User.cfc`, `firstName` and `lastName` cannot be changed through mass assignment operations like `updateAll()`.\nfunction config(){\n\tprotectedProperties(&quot;firstName,lastName&quot;);\n}\n</code></pre>"},"hint":"Use this method to specify which properties cannot be set through mass assignment.\r\n\r\n","returntype":"void","slug":"model.protectedProperties","parameters":[{"default":"","required":false,"hint":"Property name (or list of property names) that are not allowed to be altered through mass assignment.","name":"properties","type":"string"}],"availableIn":["model"],"name":"protectedProperties","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"modelconfiguration","category":"Miscellaneous Functions","section":"Model Configuration"}},{"extended":{"hasExtended":false,"docs":""},"hint":"Tells CFWheels to protect <code>POST</code>ed requests from CSRF vulnerabilities.\r\nInstructs the controller to verify that <code>params.authenticityToken</code> or <code>X-CSRF-Token</code> HTTP header is provided along with the request containing a valid authenticity token.\r\nCall this method within a controller's <code>config</code> method, preferably the base <code>Controller.cfc</code> file, to protect the entire application.\r\n\r\n","returntype":"any","slug":"controller.protectsFromForgery","parameters":[{"default":"exception","required":false,"hint":"How to handle invalid authenticity token checks. Valid values are `error` (throws a `Wheels.InvalidAuthenticityToken` error), `abort` (aborts the request silently and sends a blank response to the client), and `ignore` (ignores the check and lets the request proceed).","name":"with","type":"string"},{"default":"","required":false,"hint":"List of actions that this check should only run on. Leave blank for all.","name":"only","type":"string"},{"default":"","required":false,"hint":"List of actions that this check should be omitted from running on. Leave blank for no exceptions.","name":"except","type":"string"}],"availableIn":["controller"],"name":"protectsFromForgery","tags":{"categoryClass":"configurationfunctions","sectionClass":"controller","category":"Configuration Functions","section":"Controller"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>provides(&quot;html,xml,json&quot;);</code></pre>"},"hint":"Defines formats that the controller will respond with upon request.\r\nThe format can be requested through a URL variable called <code>format</code>, by appending the <code>format</code> name to the end of a URL as an extension (when URL rewriting is enabled), or in the request header.\r\n\r\n","returntype":"void","slug":"controller.provides","parameters":[{"default":"","required":false,"hint":"Formats to instruct the controller to provide. Valid values are `html` (the default), `xml`, `json`, `csv`, `pdf`, and `xls`.","name":"formats","type":"string"}],"availableIn":["controller"],"name":"provides","tags":{"categoryClass":"configurationfunctions","sectionClass":"controller","category":"Configuration Functions","section":"Controller"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;cfscript&gt;\n\nmapper()\n    // Route name:  ghostStory\n    // Example URL: /ghosts/666/stories/616\n    // Controller:  Stories\n    // Action:      update\n    .put(name=&quot;ghostStory&quot;, pattern=&quot;ghosts/[ghostKey]/stories/[key]&quot;, to=&quot;stories##update&quot;)\n\n    // Route name:  goblins\n    // Example URL: /goblins\n    // Controller:  Goblins\n    // Action:      update\n    .put(name=&quot;goblins&quot;, controller=&quot;goblins&quot;, action=&quot;update&quot;)\n\n    // Route name:  heartbeat\n    // Example URL: /heartbeat\n    // Controller:  Sessions\n    // Action:      update\n    .put(name=&quot;heartbeat&quot;, to=&quot;sessions##update&quot;)\n\n    // Route name:  usersPreferences\n    // Example URL: /preferences\n    // Controller:  users.Preferences\n    // Action:      update\n    .put(name=&quot;preferences&quot;, to=&quot;preferences##update&quot;, package=&quot;users&quot;)\n\n    // Route name:  orderShipment\n    // Example URL: /shipments/5432\n    // Controller:  orders.Shipments\n    // Action:      update\n    .put(\n        name=&quot;shipment&quot;,\n        pattern=&quot;shipments/[key]&quot;,\n        to=&quot;shipments##update&quot;,\n        package=&quot;orders&quot;\n    )\n\n    // Example scoping within a nested resource\n    .resources(name=&quot;subscribers&quot;, nested=true)\n        // Route name:  launchSubscribers\n        // Example URL: /subscribers/3209/launch\n        // Controller:  Subscribers\n        // Action:      launch\n        .put(name=&quot;launch&quot;, to=&quot;subscribers##update&quot;, on=&quot;collection&quot;)\n\n        // Route name:  discontinueSubscriber\n        // Example URL: /subscribers/2251/discontinue\n        // Controller:  Subscribers\n        // Action:      discontinue\n        .put(name=&quot;discontinue&quot;, to=&quot;subscribers##discontinue&quot;, on=&quot;member&quot;)\n    .end()\n.end();\n\n&lt;/cfscript&gt;</code></pre>"},"hint":"Create a route that matches a URL requiring an HTTP <code>PUT</code> method. We recommend using this matcher to expose actions that update database records. This method is provided as a convenience for when you really need to support the <code>PUT</code> verb; consider using the <code>patch</code> matcher instead of this one.\r\n\r\n","returntype":"struct","slug":"mapper.put","parameters":[{"required":false,"hint":"Camel-case name of route to reference when build links and form actions (e.g., `blogPost`).","name":"name","type":"string"},{"required":false,"hint":"Overrides the URL pattern that will match the route. The default value is a dasherized version of `name` (e.g., a `name` of `blogPost` generates a pattern of `blog-post`).","name":"pattern","type":"string"},{"required":false,"hint":"Set `controller##action` combination to map the route to. You may use either this argument or a combination of `controller` and `action`.","name":"to","type":"string"},{"required":false,"hint":"Map the route to a given controller. This must be passed along with the `action` argument.","name":"controller","type":"string"},{"required":false,"hint":"Map the route to a given action within the `controller`. This must be passed along with the `controller` argument.","name":"action","type":"string"},{"required":false,"hint":"Indicates a subfolder that the controller will be referenced from (but not added to the URL pattern). For example, if you set this to `admin`, the controller will be located at `admin/YourController.cfc`, but the URL path will not contain `admin/`.","name":"package","type":"string"},{"required":false,"hint":"If this route is within a nested resource, you can set this argument to `member` or `collection`. A `member` route contains a reference to the resource's `key`, while a `collection` route does not.","name":"on","type":"string"},{"required":false,"hint":"Redirect via 302 to this URL when this route is matched. Has precedence over controller/action. Use either an absolute link like `/about/`, or a full canonical link.","name":"redirect","type":"string"}],"availableIn":["mapper"],"name":"put","tags":{"categoryClass":"routing","sectionClass":"configuration","category":"Routing","section":"Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Basic example view code.\n&lt;cfoutput&gt;\n\t&lt;fieldset&gt;\n\t\t&lt;legend&gt;Gender&lt;/legend&gt;\n\t\t\t#radioButton(objectName=&quot;user&quot;, property=&quot;gender&quot;, tagValue=&quot;m&quot;, label=&quot;Male&quot;)#&lt;br&gt;\n\t\t\t#radioButton(objectName=&quot;user&quot;, property=&quot;gender&quot;, tagValue=&quot;f&quot;, label=&quot;Female&quot;)#\n\t&lt;/fieldset&gt;\n&lt;/cfoutput&gt;\n\n// Shows radio buttons for selecting the genders for all committee members provided by the `members` association and nested properties.\n&lt;cfoutput&gt;\n\t&lt;cfloop from=&quot;1&quot; to=&quot;#ArrayLen(committee.members)#&quot; index=&quot;i&quot;&gt;\n\t\t&lt;div&gt;\n\t\t\t&lt;h3&gt;#committee.members[i].fullName#:&lt;/h3&gt;\n\t\t\t&lt;div&gt;\n\t\t\t\t#radioButton(objectName=&quot;committee&quot;, association=&quot;members&quot;, position=i, property=&quot;gender&quot;, tagValue=&quot;m&quot;, label=&quot;Male&quot;)#&lt;br&gt;\n\t\t\t\t#radioButton(objectName=&quot;committee&quot;, association=&quot;members&quot;, position=i, property=&quot;gender&quot;, tagValue=&quot;f&quot;, label=&quot;Female&quot;)#\n\t\t\t&lt;/div&gt;\n\t\t&lt;/div&gt;\n\t&lt;/cfloop&gt;\n&lt;/cfoutput&gt;\n</code></pre>"},"hint":"Builds and returns a string containing a radio button form control based on the supplied objectName and property.\r\nNote: Pass any additional arguments like class, rel, and id, and the generated tag will also include those values as HTML attributes.\r\n\r\n","returntype":"string","slug":"controller.radioButton","parameters":[{"required":true,"hint":"The variable name of the object to build the form control for.","name":"objectName","type":"any"},{"required":true,"hint":"The name of the property to use in the form control.","name":"property","type":"string"},{"required":false,"hint":"The name of the association that the property is located on. Used for building nested forms that work with nested properties. If you are building a form with deep nesting, simply pass in a list to the nested object, and CFWheels will figure it out.","name":"association","type":"string"},{"required":false,"hint":"The position used when referencing a hasMany relationship in the association argument. Used for building nested forms that work with nested properties. If you are building a form with deep nestings, simply pass in a list of positions, and CFWheels will figure it out.","name":"position","type":"string"},{"required":false,"hint":"The value of the radio button when selected.","name":"tagValue","type":"string"},{"default":"useDefaultLabel","required":false,"hint":"The label text to use in the form control.","name":"label","type":"string"},{"default":"around","required":false,"hint":"Whether to place the label before, after, or wrapped around the form control. Label text placement can be controlled using aroundLeft or aroundRight.","name":"labelPlacement","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control. Useful to wrap the form control with HTML tags.","name":"prepend","type":"string"},{"default":"","required":false,"hint":"String to append to the form control. Useful to wrap the form control with HTML tags.","name":"append","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control's label. Useful to wrap the form control with HTML tags.","name":"prependToLabel","type":"string"},{"default":"","required":false,"hint":"String to append to the form control's label. Useful to wrap the form control with HTML tags.","name":"appendToLabel","type":"string"},{"default":"span","required":false,"hint":"HTML tag to wrap the form control with when the object contains errors.","name":"errorElement","type":"string"},{"default":"field-with-errors","required":false,"hint":"The class name of the HTML tag that wraps the form control when there are errors.","name":"errorClass","type":"string"},{"default":true,"required":false,"hint":"Use this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to `true` to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to `attributes` to only encode attribute values and not tag content.","name":"encode","type":"any"}],"availableIn":["controller"],"name":"radioButton","tags":{"categoryClass":"formobjectfunctions","sectionClass":"viewhelpers","category":"Form Object Functions","section":"View Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Basic usage usually involves a `label`, `name`, `value`, and `checked` value \n&lt;cfoutput&gt;\n\t&lt;fieldset&gt;\n\t\t&lt;legend&gt;Gender&lt;/legend&gt;\n\t\t#radioButtonTag(name=&quot;gender&quot;, value=&quot;m&quot;, label=&quot;Male&quot;, checked=true)#&lt;br&gt;\n\t\t#radioButtonTag(name=&quot;gender&quot;, value=&quot;f&quot;, label=&quot;Female&quot;)#\n\t&lt;/fieldset&gt;\n&lt;/cfoutput&gt;</code></pre>"},"hint":"Builds and returns a string containing a radio button form control based on the supplied name.\r\nNote: Pass any additional arguments like <code>class</code>, <code>rel</code>, and <code>id</code>, and the generated tag will also include those values as HTML attributes.\r\n\r\n","returntype":"string","slug":"controller.radioButtonTag","parameters":[{"required":true,"hint":"Name to populate in tag's name attribute.","name":"name","type":"string"},{"required":true,"hint":"Value to populate in tag's value attribute.","name":"value","type":"string"},{"default":false,"required":false,"hint":"Whether or not to check the radio button by default.","name":"checked","type":"boolean"},{"default":"","required":false,"hint":"The label text to use in the form control.","name":"label","type":"string"},{"default":"around","required":false,"hint":"Whether to place the label before, after, or wrapped around the form control. Label text placement can be controlled using aroundLeft or aroundRight.","name":"labelPlacement","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control. Useful to wrap the form control with HTML tags.","name":"prepend","type":"string"},{"default":"","required":false,"hint":"String to append to the form control. Useful to wrap the form control with HTML tags.","name":"append","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control's label. Useful to wrap the form control with HTML tags.","name":"prependToLabel","type":"string"},{"default":"","required":false,"hint":"String to append to the form control's label. Useful to wrap the form control with HTML tags.","name":"appendToLabel","type":"string"},{"default":true,"required":false,"hint":"Use this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to `true` to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to `attributes` to only encode attribute values and not tag content.","name":"encode","type":"any"}],"availableIn":["controller"],"name":"radioButtonTag","tags":{"categoryClass":"formtagfunctions","sectionClass":"viewhelpers","category":"Form Tag Functions","section":"View Helpers"}},{"extended":{"hasExtended":false,"docs":""},"hint":"Catches a raised error and returns the error type\r\nGreat if you want to\ttest that a certain exception will be raised.\r\n\r\n","returntype":"string","slug":"test.raised","parameters":[{"required":true,"hint":"String containing CFML expression to evaluate","name":"expression","type":"string"}],"availableIn":["test"],"name":"raised","tags":{"categoryClass":"testingfunctions","sectionClass":"testmodel","category":"Testing Functions","section":"Test Model"}},{"extended":{"hasExtended":false,"docs":""},"hint":"","returntype":"void","slug":"controller.readLangs","parameters":[{"default":"","required":false,"name":"path","type":"String"}],"availableIn":["controller"],"name":"readLangs","tags":{"categoryClass":"","sectionClass":"","category":"","section":""}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Redirect to an action after successfully saving a user.\nif (user.save()) {\n\tredirectTo(action=&quot;saveSuccessful&quot;);\n}\n\n// Redirect to a specific page on a secure server.\nredirectTo(controller=&quot;checkout&quot;, action=&quot;start&quot;, params=&quot;type=express&quot;, protocol=&quot;https&quot;);\n\n// Redirect to a route specified in `config/routes.cfm` and pass in the screen name that the route takes.\nredirectTo(route=&quot;profile&quot;, screenName=&quot;Joe&quot;);\n\n// Redirect back to the page the user came from.\nredirectTo(back=true);\n</code></pre>"},"hint":"Redirects the browser to the supplied controller/action/key, route or back to the referring page.\r\nInternally, this function uses the <code>URLFor</code> function to build the link and the <code>cflocation</code> tag to perform the redirect.\r\n\r\n","returntype":"void","slug":"controller.redirectTo","parameters":[{"default":false,"required":false,"hint":"Set to `true` to redirect back to the referring page.","name":"back","type":"boolean"},{"default":false,"required":false,"hint":"See documentation for your CFML engine's implementation of `cflocation`.","name":"addToken","type":"boolean"},{"default":302,"required":false,"hint":"See documentation for your CFML engine's implementation of `cflocation`.","name":"statusCode","type":"numeric"},{"default":"","required":false,"hint":"Name of a route that you have configured in `config/routes.cfm`.","name":"route","type":"string"},{"default":"","required":false,"name":"method","type":"string"},{"default":"","required":false,"hint":"Name of the controller to include in the URL.","name":"controller","type":"string"},{"default":"","required":false,"hint":"Name of the action to include in the URL.","name":"action","type":"string"},{"default":"","required":false,"hint":"Key(s) to include in the URL.","name":"key","type":"any"},{"default":"","required":false,"hint":"Any additional parameters to be set in the query string (example: `wheels=cool&x=y`). Please note that CFWheels uses the `&` and `=` characters to split the parameters and encode them properly for you. However, if you need to pass in `&` or `=` as part of the value, then you need to encode them (and only them), example: `a=cats%26dogs%3Dtrouble!&b=1`.","name":"params","type":"string"},{"default":"","required":false,"hint":"Sets an anchor name to be appended to the path.","name":"anchor","type":"string"},{"default":true,"required":false,"hint":"If `true`, returns only the relative URL (no protocol, host name or port).","name":"onlyPath","type":"boolean"},{"default":"","required":false,"hint":"Set this to override the current host.","name":"host","type":"string"},{"default":"","required":false,"hint":"Set this to override the current protocol.","name":"protocol","type":"string"},{"default":0,"required":false,"hint":"Set this to override the current port number.","name":"port","type":"numeric"},{"default":"","required":false,"hint":"Redirect to an external URL.","name":"url","type":"string"},{"default":false,"required":false,"hint":"Set to `true` to delay the redirection until after the rest of your action code has executed.","name":"delay","type":"boolean"},{"default":true,"required":false,"hint":"Encode URL parameters using `EncodeForURL()`. Please note that this does not make the string safe for placement in HTML attributes, for that you need to wrap the result in `EncodeForHtmlAttribute()` or use `linkTo()`, `startFormTag()` etc instead.","name":"encode","type":"boolean"}],"availableIn":["controller"],"name":"redirectTo","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"controller","category":"Miscellaneous Functions","section":"Controller"}},{"extended":{"hasExtended":false,"docs":""},"hint":"Reruns the specified migration version. Whilst you can use this in your application, the recommended useage is via either the CLI or the provided GUI interface\r\n\r\n","returntype":"string","slug":"migrator.redoMigration","parameters":[{"default":"","required":false,"hint":"The Database schema version to rerun","name":"version","type":"string"}],"availableIn":["migrator"],"name":"redoMigration","tags":{"categoryClass":"generalfunctions","sectionClass":"migrator","category":"General Functions","section":"Migrator"}},{"extended":{"hasExtended":false,"docs":""},"hint":"adds integer reference columns to table definition and creates foreign key constraints\r\n\r\n","returntype":"any","slug":"tabledefinition.references","parameters":[{"required":true,"name":"referenceNames","type":"string"},{"required":false,"name":"default","type":"string"},{"default":"false","required":false,"name":"null","type":"boolean"},{"default":"false","required":false,"name":"polymorphic","type":"boolean"},{"default":"true","required":false,"name":"foreignKey","type":"boolean"},{"default":"","required":false,"name":"onUpdate","type":"string"},{"default":"","required":false,"name":"onDelete","type":"string"}],"availableIn":["tabledefinition"],"name":"references","tags":{"categoryClass":"tabledefinitionfunctions","sectionClass":"migrator","category":"Table Definition Functions","section":"Migrator"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Get an object, call a method on it that could potentially change values, and then reload the values from the database\nemployee = model(&quot;employee&quot;).findByKey(params.key);\nemployee.someCallThatChangesValuesInTheDatabase();\nemployee.reload();</code></pre>"},"hint":"Reloads the property values of this object from the database.\r\n\r\n","returntype":"void","slug":"model.reload","parameters":[],"availableIn":["model"],"name":"reload","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"modelobject","category":"Miscellaneous Functions","section":"Model Object"}},{"extended":{"hasExtended":false,"docs":""},"hint":"Removes a column from a database table\r\nOnly available in a migration CFC\r\n\r\n","returntype":"void","slug":"migration.removeColumn","parameters":[{"required":true,"hint":"The table containing the column to remove","name":"table","type":"string"},{"default":"","required":false,"hint":"The column name to remove","name":"columnName","type":"string"},{"default":"","required":false,"hint":"optional reference name","name":"referenceName","type":"string"}],"availableIn":["migration"],"name":"removeColumn","tags":{"categoryClass":"migrationfunctions","sectionClass":"migrator","category":"Migration Functions","section":"Migrator"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>removeIndex(table='members',indexName='members_username');\n</code></pre>"},"hint":"Remove a database index\r\nOnly available in a migration CFC\r\n\r\n","returntype":"void","slug":"migration.removeIndex","parameters":[{"required":true,"hint":"The table name to perform the index operation on","name":"table","type":"string"},{"required":true,"hint":"the name of the index to remove","name":"indexName","type":"string"}],"availableIn":["migration"],"name":"removeIndex","tags":{"categoryClass":"migrationfunctions","sectionClass":"migrator","category":"Migration Functions","section":"Migrator"}},{"extended":{"hasExtended":false,"docs":""},"hint":"Removes existing records from a table\r\nOnly available in a migration CFC\r\n\r\n","returntype":"void","slug":"migration.removeRecord","parameters":[{"required":true,"hint":"The table name to remove the record from","name":"table","type":"string"},{"default":"","required":false,"hint":"The where clause, i.e id = 123","name":"where","type":"string"}],"availableIn":["migration"],"name":"removeRecord","tags":{"categoryClass":"migrationfunctions","sectionClass":"migrator","category":"Migration Functions","section":"Migrator"}},{"extended":{"hasExtended":false,"docs":""},"hint":"Renames a table column\r\nOnly available in a migration CFC\r\n\r\n","returntype":"void","slug":"migration.renameColumn","parameters":[{"required":true,"hint":"The table containing the column to rename","name":"table","type":"string"},{"required":true,"hint":"The column name to rename","name":"columnName","type":"string"},{"required":true,"hint":"The new column name","name":"newColumnName","type":"string"}],"availableIn":["migration"],"name":"renameColumn","tags":{"categoryClass":"migrationfunctions","sectionClass":"migrator","category":"Migration Functions","section":"Migrator"}},{"extended":{"hasExtended":false,"docs":""},"hint":"Renames a table\r\nOnly available in a migration CFC\r\n\r\n","returntype":"void","slug":"migration.renameTable","parameters":[{"required":true,"hint":"Name the old table","name":"oldName","type":"string"},{"required":true,"hint":"New name for the table","name":"newName","type":"string"}],"availableIn":["migration"],"name":"renameTable","tags":{"categoryClass":"migrationfunctions","sectionClass":"migrator","category":"Migration Functions","section":"Migrator"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Render a blank white page to the client\nrenderNothing();</code></pre>"},"hint":"Instructs the controller to render an empty string when it's finished processing the action.\r\nThis is very similar to calling <code>cfabort</code> with the advantage that any after filters you have set on the action will still be run.\r\n\r\n","returntype":"void","slug":"controller.renderNothing","parameters":[{"default":"[runtime expression]","required":false,"hint":"Force request to return with specific HTTP status code.","name":"status","type":"string"}],"availableIn":["controller"],"name":"renderNothing","tags":{"categoryClass":"renderingfunctions","sectionClass":"controller","category":"Rendering Functions","section":"Controller"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Render the partial `_comment.cfm` located in the current controller's view folder\nrenderPartial(&quot;comment&quot;);\n\n// Render the partial at `views/shared/_comment.cfm`\nrenderPartial(&quot;/shared/comment&quot;);</code></pre>"},"hint":"Instructs the controller to render a partial when it's finished processing the action.\r\n\r\n","returntype":"any","slug":"controller.renderPartial","parameters":[{"required":true,"hint":"The name of the partial file to be used. Prefix with a leading slash (`/`) if you need to build a path from the root `views` folder. Do not include the partial filename's underscore and file extension.","name":"partial","type":"string"},{"default":"","required":false,"hint":"Number of minutes to cache the content for.","name":"cache","type":"any"},{"default":"","required":false,"hint":"The layout to wrap the content in. Prefix with a leading slash (`/`) if you need to build a path from the root `views` folder. Pass `false` to not load a layout at all.","name":"layout","type":"string"},{"default":"","required":false,"hint":"Set to `string` to return the result instead of automatically sending it to the client.","name":"returnAs","type":"string"},{"default":true,"required":false,"hint":"Name of a controller function to load data from.","name":"dataFunction","type":"any"},{"default":"[runtime expression]","required":false,"hint":"Force request to return with specific HTTP status code.","name":"status","type":"string"}],"availableIn":["controller"],"name":"renderPartial","tags":{"categoryClass":"renderingfunctions","sectionClass":"controller","category":"Rendering Functions","section":"Controller"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Render just the text &quot;Done!&quot; to the client\nrenderText(&quot;Done!&quot;);\n\n// Render serialized product data to the client\nproducts = model(&quot;product&quot;).findAll();\nrenderText(SerializeJson(products));</code></pre>"},"hint":"Instructs the controller to render specified text when it's finished processing the action.\r\n\r\n","returntype":"void","slug":"controller.renderText","parameters":[{"default":"","required":false,"hint":"The text to render.","name":"text","type":"string"},{"default":"[runtime expression]","required":false,"hint":"Force request to return with specific HTTP status code.","name":"status","type":"any"}],"availableIn":["controller"],"name":"renderText","tags":{"categoryClass":"renderingfunctions","sectionClass":"controller","category":"Rendering Functions","section":"Controller"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Render a view page for a different action within the same controller.\nrenderView(action=&quot;edit&quot;);\n\n// Render a view page for a different action within a different controller.\nrenderView(controller=&quot;blog&quot;, action=&quot;new&quot;);\n\n// Another way to render the blog/new template from within a different controller.\nrenderView(template=&quot;/blog/new&quot;);\n\n// Render the view page for the current action but without a layout and cache it for 60 minutes.\nrenderView(layout=false, cache=60);\n\n// Load a layout from a different folder within `views`.\nrenderView(layout=&quot;/layouts/blog&quot;);\n\n// Don't render the view immediately but rather return and store in a variable for further processing.\nmyView = renderView(returnAs=&quot;string&quot;);\n</code></pre>"},"hint":"Instructs the controller which view template and layout to render when it's finished processing the action.\r\nNote that when passing values for controller and / or action, this function does not execute the actual action but rather just loads the corresponding view template.\r\n\r\n","returntype":"any","slug":"controller.renderView","parameters":[{"default":"[runtime expression]","required":false,"hint":"Controller to include the view page for.","name":"controller","type":"string"},{"default":"[runtime expression]","required":false,"hint":"Action to include the view page for.","name":"action","type":"string"},{"default":"","required":false,"hint":"A specific template to render. Prefix with a leading slash (`/`) if you need to build a path from the root `views` folder.","name":"template","type":"string"},{"default":"","required":false,"hint":"The layout to wrap the content in. Prefix with a leading slash (`/`) if you need to build a path from the root `views` folder. Pass `false` to not load a layout at all.","name":"layout","type":"any"},{"default":"","required":false,"hint":"Number of minutes to cache the content for.","name":"cache","type":"any"},{"default":"","required":false,"hint":"Set to `string` to return the result instead of automatically sending it to the client.","name":"returnAs","type":"string"},{"default":false,"required":false,"hint":"Set to `true` to hide the debug information at the end of the output. This is useful, for example, when you're testing XML output in an environment where the global setting for `showDebugInformation` is `true`.","name":"hideDebugInformation","type":"boolean"},{"default":"[runtime expression]","required":false,"hint":"Force request to return with specific HTTP status code.","name":"status","type":"string"}],"availableIn":["controller"],"name":"renderView","tags":{"categoryClass":"renderingfunctions","sectionClass":"controller","category":"Rendering Functions","section":"Controller"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// This will provide the formats defined in the `config()` function.\nproducts = model(&quot;product&quot;).findAll();\nrenderWith(products);\n\n// Provide a 403 status code for a json response (for example)\nmsg={\n\t&quot;status&quot; : &quot;Error&quot;,\n\t&quot;message&quot;: &quot;Not Authenticated&quot;\n}\nrenderWith(data=msg, status=403)\n</code></pre>"},"hint":"Instructs the controller to render the data passed in to the format that is requested.\r\nIf the format requested is <code>json</code> or <code>xml</code>, CFWheels will transform the data into that format automatically.\r\nFor other formats (or to override the automatic formatting), you can also create a view template in this format: <code>nameofaction.xml.cfm</code>, <code>nameofaction.json.cfm</code>, <code>nameofaction.pdf.cfm</code>, etc.\r\n\r\n","returntype":"any","slug":"controller.renderWith","parameters":[{"required":true,"hint":"Data to format and render.","name":"data","type":"any"},{"default":"[runtime expression]","required":false,"hint":"Controller to include the view page for.","name":"controller","type":"string"},{"default":"[runtime expression]","required":false,"hint":"Action to include the view page for.","name":"action","type":"string"},{"default":"","required":false,"hint":"A specific template to render. Prefix with a leading slash (`/`) if you need to build a path from the root `views` folder.","name":"template","type":"string"},{"default":"","required":false,"hint":"The layout to wrap the content in. Prefix with a leading slash (`/`) if you need to build a path from the root `views` folder. Pass `false` to not load a layout at all.","name":"layout","type":"any"},{"default":"","required":false,"hint":"Number of minutes to cache the content for.","name":"cache","type":"any"},{"default":"","required":false,"hint":"Set to `string` to return the result instead of automatically sending it to the client.","name":"returnAs","type":"string"},{"default":false,"required":false,"hint":"Set to `true` to hide the debug information at the end of the output. This is useful, for example, when you're testing XML output in an environment where the global setting for `showDebugInformation` is `true`.","name":"hideDebugInformation","type":"boolean"},{"default":"[runtime expression]","required":false,"hint":"Force request to return with specific HTTP status code.","name":"status","type":"string"}],"availableIn":["controller"],"name":"renderWith","tags":{"categoryClass":"renderingfunctions","sectionClass":"controller","category":"Rendering Functions","section":"Controller"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// alternating row colors and shrinking emphasis\n&lt;cfoutput query=&quot;employees&quot; group=&quot;departmentId&quot;&gt;\n\t&lt;div class=&quot;#cycle(values=&quot;even,odd&quot;, name=&quot;row&quot;)#&quot;&gt;\n\t\t&lt;ul&gt;\n\t\t\t&lt;cfoutput&gt;\n\t\t\t\trank = cycle(values=&quot;president,vice-president,director,manager,specialist,intern&quot;, name=&quot;position&quot;)&gt;\n\t\t\t\t&lt;li class=&quot;#rank#&quot;&gt;#categories.categoryName#&lt;/li&gt;\n\t\t\t\tresetCycle(&quot;emphasis&quot;)&gt;\n\t\t\t&lt;/cfoutput&gt;\n\t\t&lt;/ul&gt;\n\t&lt;/div&gt;\n&lt;/cfoutput&gt;</code></pre>"},"hint":"Resets a cycle so that it starts from the first list value the next time it is called.\r\n\r\n","returntype":"void","slug":"controller.resetCycle","parameters":[{"default":"default","required":false,"hint":"The name of the cycle to reset.","name":"name","type":"string"}],"availableIn":["controller"],"name":"resetCycle","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"viewhelpers","category":"Miscellaneous Functions","section":"View Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;cfscript&gt;\n\nmapper()\n    // With default arguments\n    .resource(&quot;checkout&quot;)\n\n    // Point auth URL to controller at `controllers/sessions/Auth.cfc`\n    .resource(name=&quot;auth&quot;, controller=&quot;sessions.auth&quot;)\n\n    // Limited list of routes generated by `only` argument.\n    .resource(name=&quot;profile&quot;, only=&quot;show,edit,update&quot;)\n\n    // Limited list of routes generated by `except` argument.\n    .resource(name=&quot;cart&quot;, except=&quot;new,create,edit,delete&quot;)\n\n    // Nested resource\n    .resource(name=&quot;preferences&quot;, only=&quot;index&quot;, nested=true)\n      .get(name=&quot;editPassword&quot;, to=&quot;passwords##edit&quot;)\n      .patch(name=&quot;password&quot;, to=&quot;passwords##update&quot;)\n\n      .resources(&quot;foods&quot;)\n    .end()\n\n    // Overridden `path`\n    .resource(name=&quot;blogPostOptions&quot;, path=&quot;blog-post/options&quot;)\n.end();\n\n&lt;/cfscript&gt;</code></pre>"},"hint":"Create a group of routes that exposes actions for manipulating a singular resource. A singular resource exposes URL patterns for the entire CRUD lifecycle of a single entity (<code>show</code>, <code>new</code>, <code>create</code>, <code>edit</code>, <code>update</code>, and <code>delete</code>) without exposing a primary key in the URL. Usually this type of resource represents a singleton entity tied to the session, application, or another resource (perhaps nested within another resource). If you need to generate routes for manipulating a collection of resources with a primary key in the URL, see the <code>resources</code> mapper method.\r\n\r\n","returntype":"struct","slug":"mapper.resource","parameters":[{"required":true,"hint":"Camel-case name of resource to reference when build links and form actions. This is typically a singular word (e.g., `profile`).","name":"name","type":"string"},{"default":false,"required":false,"hint":"Whether or not additional calls will be nested within this resource.","name":"nested","type":"boolean"},{"default":"[runtime expression]","required":false,"hint":"Override URL path representing this resource. Default is a dasherized version of `name` (e.g., `blogPost` generates a path of `blog-post`).","name":"path","type":"string"},{"required":false,"hint":"Override name of the controller used by resource. This defaults to a pluralized version of `name`.","name":"controller","type":"string"},{"required":false,"hint":"Override singularize() result in plural resources.","name":"singular","type":"string"},{"required":false,"hint":"Override pluralize() result in singular resource.","name":"plural","type":"string"},{"required":false,"hint":"Limits the list of RESTful routes to generate. Can include `show`, `new`, `create`, `edit`, `update`, and `delete`.","name":"only","type":"string"},{"required":false,"hint":"Excludes RESTful routes to generate, taking priority over the `only` argument. Can include `show`, `new`, `create`, `edit,` `update`, and `delete`.","name":"except","type":"string"},{"required":false,"hint":"Turn on shallow resources.","name":"shallow","type":"boolean"},{"required":false,"hint":"Shallow path prefix.","name":"shallowPath","type":"string"},{"required":false,"hint":"Shallow name prefix.","name":"shallowName","type":"string"},{"required":false,"hint":"Variable patterns to use for matching.","name":"constraints","type":"struct"},{"default":"resource","required":false,"name":"$call","type":"string"},{"default":false,"required":false,"name":"$plural","type":"boolean"},{"default":"[runtime expression]","required":false,"hint":"Whether or not to add an optional `.[format]` pattern to the end of the generated routes. This is useful for providing formats via URL like `json`, `xml`, `pdf`, etc.","name":"mapFormat","type":"boolean"}],"availableIn":["mapper"],"name":"resource","tags":{"categoryClass":"routing","sectionClass":"configuration","category":"Routing","section":"Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;cfscript&gt;\n\nmapper()\n    // With default arguments\n    .resources(&quot;admins&quot;)\n\n    // Point authors URL to controller at `controllers/Users.cfc`\n    .resources(name=&quot;authors&quot;, controller=&quot;users&quot;)\n\n    // Limited list of routes generated by `only` argument.\n    .resources(name=&quot;products&quot;, only=&quot;index,show,edit,update&quot;)\n\n    // Limited list of routes generated by `except` argument.\n    .resources(name=&quot;orders&quot;, except=&quot;delete&quot;)\n\n    // Nested resources\n    .resources(name=&quot;stories&quot;, nested=true)\n      .resources(&quot;heroes&quot;)\n      .resources(&quot;villains&quot;)\n    .end()\n\n    // Overridden `path`\n    .resources(name=&quot;blogPostsOptions&quot;, path=&quot;blog-posts/options&quot;)\n.end();\n\n&lt;/cfscript&gt;</code></pre>"},"hint":"Create a group of routes that exposes actions for manipulating a collection of resources. A plural resource exposes URL patterns for the entire CRUD lifecycle (<code>index</code>, <code>show</code>, <code>new</code>, <code>create</code>, <code>edit</code>, <code>update</code>, <code>delete</code>), exposing a primary key in the URL for showing, editing, updating, and deleting records. If you need to generate routes for manipulating a singular resource without a primary key, see the <code>resource</code> mapper method.\r\n\r\n","returntype":"struct","slug":"mapper.resources","parameters":[{"required":true,"hint":"Camel-case name of resource to reference when build links and form actions. This is typically a plural word (e.g., `posts`).","name":"name","type":"string"},{"default":false,"required":false,"hint":"Whether or not additional calls will be nested within this resource.","name":"nested","type":"boolean"},{"default":"[runtime expression]","required":false,"hint":"Override URL path representing this resource. Default is a dasherized version of `name` (e.g., `blogPosts` generates a path of `blog-posts`).","name":"path","type":"string"},{"required":false,"hint":"Override name of the controller used by resource. This defaults to the value provided for `name`.","name":"controller","type":"string"},{"required":false,"hint":"Override singularize() result in plural resources.","name":"singular","type":"string"},{"required":false,"hint":"Override pluralize() result in singular resource.","name":"plural","type":"string"},{"required":false,"hint":"Limits the list of RESTful routes to generate. Can include `index`, `show`, `new`, `create`, `edit`, `update`, and `delete`.","name":"only","type":"string"},{"required":false,"hint":"Excludes RESTful routes to generate, taking priority over the `only` argument. Can include `index`, `show`, `new`, `create`, `edit`, `update`, and `delete`.","name":"except","type":"string"},{"required":false,"hint":"Turn on shallow resources.","name":"shallow","type":"boolean"},{"required":false,"hint":"Shallow path prefix.","name":"shallowPath","type":"string"},{"required":false,"hint":"Shallow name prefix.","name":"shallowName","type":"string"},{"required":false,"hint":"Variable patterns to use for matching.","name":"constraints","type":"struct"},{"default":"[runtime expression]","required":false,"hint":"Whether or not to add an optional `.[format]` pattern to the end of the generated routes. This is useful for providing formats via URL like `json`, `xml`, `pdf`, etc.","name":"mapFormat","type":"boolean"}],"availableIn":["mapper"],"name":"resources","tags":{"categoryClass":"routing","sectionClass":"configuration","category":"Routing","section":"Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>wheelsResponse = response();</code></pre>"},"hint":"Returns content that CFWheels will send to the client in response to the request.\r\n\r\n","returntype":"string","slug":"controller.response","parameters":[],"availableIn":["controller"],"name":"response","tags":{"categoryClass":"renderingfunctions","sectionClass":"controller","category":"Rendering Functions","section":"Controller"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;cfscript&gt;\n\nmapper()\n    .namespace(&quot;api&quot;)\n        // Map the root of the `api` folder to the `index` action of the `apis`\n        // controller.\n        .root(controller=&quot;apis&quot;, action=&quot;index&quot;)\n    .end()\n\n    // Map the root of the application to the `show` action of the `dashboards`\n    // controller.\n    .root(to=&quot;dashboards##show&quot;)\n.end();\n\n&lt;/cfscript&gt;</code></pre>"},"hint":"Create a route that matches the root of its current context. This mapper can be used for the application's web root (or home page), or it can generate a route for the root of a namespace or other path scoping mapper.\r\n\r\n","returntype":"struct","slug":"mapper.root","parameters":[{"required":false,"hint":"Set `controller##action` combination to map the route to. You may use either this argument or a combination of `controller` and `action`.","name":"to","type":"string"},{"required":false,"hint":"Set to `true` to include the format (e.g. `.json`) in the route.","name":"mapFormat","type":"boolean"}],"availableIn":["mapper"],"name":"root","tags":{"categoryClass":"routing","sectionClass":"configuration","category":"Routing","section":"Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Save the user object to the database (will automatically do an `INSERT` or `UPDATE` statement depending on if the record is new or already exists\nuser.save();\n\n// Save the user object directly in an if statement without using `cfqueryparam` and take appropriate action based on the result\nif(user.save(parameterize=false)){\n\tflashInsert(notice=&quot;The user was saved!&quot;);\n\tredirectTo(action=&quot;edit&quot;);\n} else {\n\tflashInsert(alert=&quot;Error, please correct!&quot;);\n\trenderView(action=&quot;edit&quot;);\n}</code></pre>"},"hint":"Saves the object if it passes validation and callbacks.\r\nReturns <code>true</code> if the object was saved successfully to the database, <code>false</code> if not.\r\n\r\n","returntype":"boolean","slug":"model.save","parameters":[{"default":true,"required":false,"hint":"Set to `true` to use `cfqueryparam` on all columns, or pass in a list of property names to use `cfqueryparam` on those only.","name":"parameterize","type":"any"},{"default":false,"required":false,"hint":"Set to `true` to force CFWheels to query the database even though an identical query for this model may have been run in the same request. (The default in CFWheels is to get the second query from the model's request-level cache.)","name":"reload","type":"boolean"},{"default":true,"required":false,"hint":"Set to `false` to skip validations for this operation.","name":"validate","type":"boolean"},{"default":"[runtime expression]","required":false,"hint":"Set this to `commit` to update the database, `rollback` to run all the database queries but not commit them, or `none` to skip transaction handling altogether.","name":"transaction","type":"string"},{"default":true,"required":false,"hint":"Set to `false` to disable callbacks for this method.","name":"callbacks","type":"boolean"}],"availableIn":["model"],"name":"save","tags":{"categoryClass":"crudfunctions","sectionClass":"modelclass","category":"CRUD Functions","section":"Model Class"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;cfscript&gt;\n\nmapper()\n    // All routes inside will use the `freeForAll` controller.\n    .scope(controller=&quot;freeForAll&quot;)\n        .get(name=&quot;bananas&quot;, action=&quot;bananas&quot;)\n        .root(action=&quot;index&quot;)\n    .end()\n\n    // All routes's controllers inside will be inside the `public` package/subfolder.\n    .scope(package=&quot;public&quot;)\n        .resource(name=&quot;search&quot;, only=&quot;show,create&quot;)\n    .end()\n\n    // All routes inside will be prepended with a URL path of `phones/`.\n    .scope(path=&quot;phones&quot;)\n        .get(name=&quot;newest&quot;, to=&quot;phones##newest&quot;)\n        .get(name=&quot;sortOfNew&quot;, to=&quot;phones##sortOfNew&quot;)\n    .end()\n.end();\n\n&lt;/cfscript&gt;</code></pre>"},"hint":"Set any number of parameters to be inherited by mappers called within this matcher's block. For example, set a package or URL path to be used by all child routes.\r\n\r\n","returntype":"struct","slug":"mapper.scope","parameters":[{"required":false,"hint":"Name to prepend to child route names for use when building links, forms, and other URLs.","name":"name","type":"string"},{"required":false,"hint":"Path to prefix to all child routes.","name":"path","type":"string"},{"required":false,"hint":"Package namespace to append to controllers.","name":"package","type":"string"},{"required":false,"hint":"Controller to use for routes.","name":"controller","type":"string"},{"required":false,"hint":"Turn on shallow resources to eliminate routing added before this one.","name":"shallow","type":"boolean"},{"required":false,"hint":"Shallow path prefix.","name":"shallowPath","type":"string"},{"required":false,"hint":"Shallow name prefix.","name":"shallowName","type":"string"},{"required":false,"hint":"Variable patterns to use for matching.","name":"constraints","type":"struct"},{"default":"scope","required":false,"name":"$call","type":"string"}],"availableIn":["mapper"],"name":"scope","tags":{"categoryClass":"routing","sectionClass":"configuration","category":"Routing","section":"Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;!--- This &quot;Tag&quot; version of the function accepts a `name` and `selected` instead of binding to a model object ---&gt;\n#secondSelectTag(name=&quot;secondsToLaunch&quot;, selected=params.secondsToLaunch)#\n&lt;/cfoutput&gt;\n\n&lt;!--- Only show 15-second intervals ---&gt;\n#secondSelectTag(name=&quot;secondsToLaunch&quot;, value=params.secondsToLaunch, secondStep=15)# </code></pre>"},"hint":"Builds and returns a string containing one <code>select</code> form control for the seconds of a minute based on the supplied name.\r\n\r\n","returntype":"string","slug":"controller.secondSelectTag","parameters":[{"required":true,"hint":"Name to populate in tag's name attribute.","name":"name","type":"string"},{"default":"","required":false,"hint":"The day that should be selected initially.","name":"selected","type":"string"},{"default":1,"required":false,"hint":"Pass in 10 to only show seconds 10, 20, 30, etc.","name":"secondStep","type":"numeric"},{"default":false,"required":false,"hint":"Whether to include a blank option in the select form control. Pass true to include a blank line or a string that should represent what display text should appear for the empty value (for example, \"- Select One -\").","name":"includeBlank","type":"any"},{"default":"","required":false,"hint":"The label text to use in the form control.","name":"label","type":"string"},{"default":"around","required":false,"hint":"Whether to place the label before, after, or wrapped around the form control. Label text placement can be controlled using aroundLeft or aroundRight.","name":"labelPlacement","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control. Useful to wrap the form control with HTML tags.","name":"prepend","type":"string"},{"default":"","required":false,"hint":"String to append to the form control. Useful to wrap the form control with HTML tags.","name":"append","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control's label. Useful to wrap the form control with HTML tags.","name":"prependToLabel","type":"string"},{"default":"","required":false,"hint":"String to append to the form control's label. Useful to wrap the form control with HTML tags.","name":"appendToLabel","type":"string"},{"default":true,"required":false,"hint":"Use this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to `true` to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to `attributes` to only encode attribute values and not tag content.","name":"encode","type":"any"},{"default":"[runtime expression]","required":false,"name":"$now","type":"date"}],"availableIn":["controller"],"name":"secondSelectTag","tags":{"categoryClass":"formtagfunctions","sectionClass":"viewhelpers","category":"Form Tag Functions","section":"View Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Example 1: Basic `select` field with `label` and required `objectName` and `property` arguments\n// - Controller code\nauthors = model(&quot;author&quot;).findAll();\n\n&lt;!--- View code---&gt;\n#select(objectName=&quot;book&quot;, property=&quot;authorId&quot;, options=authors)#\n\n&lt;!---\n\tDo this when CFWheels isn't grabbing the correct values for the `option`s' values and display texts\n\tNote that `valueField` and `textField` are both required when using this option\n---&gt;\n#select(objectName=&quot;book&quot;, property=&quot;authorId&quot;, options=authors, valueField=&quot;id&quot;, textField=&quot;authorfullname&quot;)#\n\n// Example 2: Shows `select` fields for selecting order statuses for all shipments provided by the `orders` association and nested properties\n// Controller code\nshipment = model(&quot;shipment&quot;).findByKey(key=params.key, where=&quot;shipments.statusId=#application.NEW_STATUS_ID#&quot;, include=&quot;order&quot;);\nstatuses = model(&quot;status&quot;).findAll(order=&quot;name&quot;);\n\n&lt;!--- View code---&gt;\n&lt;cfloop from=&quot;1&quot; to=&quot;#ArrayLen(shipments.orders)#&quot; index=&quot;i&quot;&gt;\n\t#select(label=&quot;Order #shipments.orders[i].orderNum#&quot;, objectName=&quot;shipment&quot;, association=&quot;orders&quot;, position=i, property=&quot;statusId&quot;, options=statuses)#\n&lt;/cfloop&gt;\n</code></pre>"},"hint":"Builds and returns a string containing a select form control based on the supplied objectName and property.\r\nNote: Pass any additional arguments like class, rel, and id, and the generated tag will also include those values as HTML attributes.\r\n\r\n","returntype":"string","slug":"controller.select","parameters":[{"required":true,"hint":"The variable name of the object to build the form control for.","name":"objectName","type":"any"},{"required":true,"hint":"The name of the property to use in the form control.","name":"property","type":"string"},{"required":false,"hint":"The name of the association that the property is located on. Used for building nested forms that work with nested properties. If you are building a form with deep nesting, simply pass in a list to the nested object, and CFWheels will figure it out.","name":"association","type":"string"},{"required":false,"hint":"The position used when referencing a hasMany relationship in the association argument. Used for building nested forms that work with nested properties. If you are building a form with deep nestings, simply pass in a list of positions, and CFWheels will figure it out.","name":"position","type":"string"},{"required":false,"hint":"A collection to populate the select form control with. Can be a query recordset or an array of objects.","name":"options","type":"any"},{"default":false,"required":false,"hint":"Whether to include a blank option in the select form control. Pass true to include a blank line or a string that should represent what display text should appear for the empty value (for example, \"- Select One -\").","name":"includeBlank","type":"any"},{"default":"","required":false,"hint":"The column or property to use for the value of each list element. Used only when a query or array of objects has been supplied in the options argument.  Required when specifying `textField`","name":"valueField","type":"string"},{"default":"","required":false,"hint":"The column or property to use for the value of each list element that the end user will see. Used only when a query or array of objects has been supplied in the options argument. Required when specifying `valueField`","name":"textField","type":"string"},{"default":"useDefaultLabel","required":false,"hint":"The label text to use in the form control.","name":"label","type":"string"},{"default":"around","required":false,"hint":"Whether to place the label before, after, or wrapped around the form control. Label text placement can be controlled using aroundLeft or aroundRight.","name":"labelPlacement","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control. Useful to wrap the form control with HTML tags.","name":"prepend","type":"string"},{"default":"","required":false,"hint":"String to append to the form control. Useful to wrap the form control with HTML tags.","name":"append","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control's label. Useful to wrap the form control with HTML tags.","name":"prependToLabel","type":"string"},{"default":"","required":false,"hint":"String to append to the form control's label. Useful to wrap the form control with HTML tags.","name":"appendToLabel","type":"string"},{"default":"span","required":false,"hint":"HTML tag to wrap the form control with when the object contains errors.","name":"errorElement","type":"string"},{"default":"field-with-errors","required":false,"hint":"The class name of the HTML tag that wraps the form control when there are errors.","name":"errorClass","type":"string"},{"default":true,"required":false,"hint":"Use this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to `true` to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to `attributes` to only encode attribute values and not tag content.","name":"encode","type":"any"}],"availableIn":["controller"],"name":"select","tags":{"categoryClass":"formobjectfunctions","sectionClass":"viewhelpers","category":"Form Object Functions","section":"View Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Controller code\ncities = model(&quot;city&quot;).findAll()&gt;\n\n&lt;!--- View code---&gt;\n#selectTag(name=&quot;cityId&quot;, options=cities)#\n\n&lt;!---\n\tDo this when CFWheels isn't grabbing the correct values for the `option`s' values and display texts\n\tNote that `valueField` and `textField` are both required when using this option\n---&gt;\n#selectTag(name=&quot;cityId&quot;, options=cities, valueField=&quot;id&quot;, textField=&quot;name&quot;)#\n</code></pre>"},"hint":"Builds and returns a string containing a select form control based on the supplied name and options.\r\nNote: Pass any additional arguments like <code>class</code>, <code>rel</code>, and <code>id</code>, and the generated tag will also include those values as HTML attributes.\r\n\r\n","returntype":"string","slug":"controller.selectTag","parameters":[{"required":true,"hint":"Name to populate in tag's name attribute.","name":"name","type":"string"},{"required":true,"hint":"A collection to populate the select form control with. Can be a query recordset or an array of objects.","name":"options","type":"any"},{"default":"","required":false,"hint":"Value of option that should be selected by default.","name":"selected","type":"string"},{"default":false,"required":false,"hint":"Whether to include a blank option in the select form control. Pass true to include a blank line or a string that should represent what display text should appear for the empty value (for example, \"- Select One -\").","name":"includeBlank","type":"any"},{"default":false,"required":false,"hint":"Whether to allow multiple selection of options in the select form control.","name":"multiple","type":"boolean"},{"default":"","required":false,"hint":"The column or property to use for the value of each list element. Used only when a query or array of objects has been supplied in the options argument.  Required when specifying `textField`","name":"valueField","type":"string"},{"default":"","required":false,"hint":"The column or property to use for the value of each list element that the end user will see. Used only when a query or array of objects has been supplied in the options argument. Required when specifying `valueField`","name":"textField","type":"string"},{"default":"","required":false,"hint":"The label text to use in the form control.","name":"label","type":"string"},{"default":"around","required":false,"hint":"Whether to place the label before, after, or wrapped around the form control. Label text placement can be controlled using aroundLeft or aroundRight.","name":"labelPlacement","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control. Useful to wrap the form control with HTML tags.","name":"prepend","type":"string"},{"default":"","required":false,"hint":"String to append to the form control. Useful to wrap the form control with HTML tags.","name":"append","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control's label. Useful to wrap the form control with HTML tags.","name":"prependToLabel","type":"string"},{"default":"","required":false,"hint":"String to append to the form control's label. Useful to wrap the form control with HTML tags.","name":"appendToLabel","type":"string"},{"default":true,"required":false,"hint":"Use this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to `true` to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to `attributes` to only encode attribute values and not tag content.","name":"encode","type":"any"}],"availableIn":["controller"],"name":"selectTag","tags":{"categoryClass":"formtagfunctions","sectionClass":"viewhelpers","category":"Form Tag Functions","section":"View Helpers"}},{"extended":{"hasExtended":false,"docs":""},"hint":"","returntype":"any","slug":"controller.sendConfirmEmail","parameters":[{"required":false,"name":"userid","type":"numeric"}],"availableIn":["controller"],"name":"sendConfirmEmail","tags":{"categoryClass":"","sectionClass":"","category":"","section":""}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Get a member and send a welcome email, passing in a few custom variables to the template\nnewMember = model(&quot;member&quot;).findByKey(params.member.id);\nsendEmail(\n\tto=newMember.email,\n\ttemplate=&quot;myemailtemplate&quot;,\n\tsubject=&quot;Thank You for Becoming a Member&quot;,\n\trecipientName=newMember.name,\n\tstartDate=newMember.startDate\n);</code></pre>"},"hint":"Sends an email using a template and an optional layout to wrap it in.\r\nBesides the CFWheels-specific arguments documented here, you can also pass in any argument that is accepted by the <code>cfmail</code> tag as well as your own arguments to be used by the view.\r\n\r\n","returntype":"any","slug":"controller.sendEmail","parameters":[{"default":"","required":false,"hint":"The path to the email template or two paths if you want to send a multipart email. if the `detectMultipart` argument is `false`, the template for the text version should be the first one in the list. This argument is also aliased as `templates`.","name":"template","type":"string"},{"default":"support@march2success.com (March2Success)","required":false,"hint":"Email address to send from.","name":"from","type":"string"},{"default":"","required":false,"hint":"List of email addresses to send the email to.","name":"to","type":"string"},{"default":"","required":false,"hint":"The subject line of the email.","name":"subject","type":"string"},{"default":false,"required":false,"hint":"Layout(s) to wrap the email template in. This argument is also aliased as `layouts`.","name":"layout","type":"any"},{"default":"","required":false,"hint":"A list of the names of the files to attach to the email. This will reference files stored in the `files` folder (or a path relative to it). This argument is also aliased as `files`.","name":"file","type":"string"},{"default":true,"required":false,"hint":"When set to `true` and multiple values are provided for the `template` argument, CFWheels will detect which of the templates is text and which one is HTML (by counting the `<` characters).","name":"detectMultipart","type":"boolean"},{"default":true,"required":false,"hint":"When set to `false`, the email will not be sent.","name":"deliver","type":"boolean"},{"default":"","required":false,"hint":"The file to which the email contents will be written","name":"writeToFile","type":"string"}],"availableIn":["controller"],"name":"sendEmail","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"controller","category":"Miscellaneous Functions","section":"Controller"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Send a PDF file to the user\nsendFile(file=&quot;wheels_tutorial_20081028_J657D6HX.pdf&quot;);\n\n// Send the same file but give the user a different name in the browser dialog window\nsendFile(file=&quot;wheels_tutorial_20081028_J657D6HX.pdf&quot;, name=&quot;Tutorial.pdf&quot;);\n\n// Send a file that is located outside of the web root\nsendFile(file=&quot;../../tutorials/wheels_tutorial_20081028_J657D6HX.pdf&quot;);\n\n// Send a file that is located in ram://\nsendFile(file=&quot;ram://wheels_tutorial_20081028_J657D6HX.pdf&quot;);</code></pre>"},"hint":"Sends a file to the user (from the <code>files</code> folder or a path relative to it by default).\r\n\r\n","returntype":"any","slug":"controller.sendFile","parameters":[{"required":true,"hint":"The file to send to the user.","name":"file","type":"string"},{"default":"","required":false,"hint":"The file name to show in the browser download dialog box.","name":"name","type":"string"},{"default":"","required":false,"hint":"The HTTP content type to deliver the file as.","name":"type","type":"string"},{"default":"attachment","required":false,"hint":"Set to `inline` to have the browser handle the opening of the file (possibly inline in the browser) or set to `attachment` to force a download dialog box.","name":"disposition","type":"string"},{"default":"","required":false,"hint":"Directory outside of the web root where the file exists. Must be a full path.","name":"directory","type":"string"},{"default":false,"required":false,"hint":"Pass in `true` to delete the file on the server after sending it.","name":"deleteFile","type":"boolean"},{"default":true,"required":false,"name":"deliver","type":"boolean"}],"availableIn":["controller"],"name":"sendFile","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"controller","category":"Miscellaneous Functions","section":"Controller"}},{"extended":{"hasExtended":false,"docs":""},"hint":"","returntype":"any","slug":"controller.sendInfo","parameters":[{"required":true,"name":"userID","type":"numeric"}],"availableIn":["controller"],"name":"sendInfo","tags":{"categoryClass":"","sectionClass":"","category":"","section":""}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Example 1: Set the `URLRewriting` setting to `Partial`.\nset(URLRewriting=&quot;Partial&quot;);\n\n// Example 2: Set default values for the arguments in the `buttonTo` view helper. This works for the majority of Wheels functions/arguments.\nset(functionName=&quot;buttonTo&quot;, onlyPath=true, host=&quot;&quot;, protocol=&quot;&quot;, port=0, text=&quot;&quot;, confirm=&quot;&quot;, image=&quot;&quot;, disable=&quot;&quot;);\n\n// Example 3: Set the default values for a form helper to get the form marked up to your preferences.\nset(functionName=&quot;textField&quot;, labelPlacement=&quot;before&quot;, prependToLabel=&quot;&lt;div&gt;&quot;, append=&quot;&lt;/div&gt;&quot;, appendToLabel=&quot;&lt;br&gt;&quot;):\n</code></pre>"},"hint":"Use to configure a global setting or set a default for a function.\r\n\r\n","returntype":"void","slug":"controller.set","parameters":[],"availableIn":["controller","model","test","migrator","migration","tabledefinition"],"name":"set","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"configuration","category":"Miscellaneous Functions","section":"Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Set filter chain directly in an array.\nsetFilterChain([\n\t{through=&quot;restrictAccess&quot;},\n\t{through=&quot;isLoggedIn, checkIPAddress&quot;, except=&quot;home, login&quot;},\n\t{type=&quot;after&quot;, through=&quot;logConversion&quot;, only=&quot;thankYou&quot;}\n]);\n</code></pre>"},"hint":"Use this function if you need a more low level way of setting the entire filter chain for a controller.\r\n\r\n","returntype":"void","slug":"controller.setFilterChain","parameters":[{"required":true,"hint":"An array of structs, each of which represent an `argumentCollection` that get passed to the `filters` function. This should represent the entire filter chain that you want to use for this controller.","name":"chain","type":"array"}],"availableIn":["controller"],"name":"setFilterChain","tags":{"categoryClass":"configurationfunctions","sectionClass":"controller","category":"Configuration Functions","section":"Controller"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>/* Note that there are two ways to do pagination yourself using a custom query.\n\t1) Do a query that grabs everything that matches and then use\n\tthe `cfouput` or `cfloop` tag to page through the results.\n\t2) Use your database to make 2 queries. The first query\n\tbasically does a count of the total number of records that match\n\tthe criteria and the second query actually selects the page of\n\trecords for retrieval.\n\tIn the example below, we will show how to write a custom query\n\tusing both of these methods. Note that the syntax where your\n\tdatabase performs the pagination will differ depending on the\n\tdatabase engine you are using. Plese consult your database\n\tengine's documentation for the correct syntax.\n\tAlso note that the view code will differ depending on the method\n\tused.\n*/\n\n//=================== First method: Handle the pagination through your CFML engine\n\n// Model code: In your model (ie. User.cfc), create a custom method for your custom query\nfunction myCustomQuery(required numeric page, numeric perPage=25){\n\tlocal.customQuery=QueryExecute(&quot;SELECT * FROM users&quot;, [], { datasource=get('dataSourceName') });\n\tsetPagination(\n\t\ttotalRecords=local.customQuery.RecordCount,\n\t\tcurrentPage=arguments.page,\n\t\tperPage=arguments.perPage,\n\t\thandle=&quot;myCustomQueryHandle&quot;);\n\treturn local.customQuery;\n}\n\n// Controller code\nfunction list(){\n\tparam name=&quot;params.page&quot; default=&quot;1;\n\tparam name=&quot;params.perPage&quot; default=&quot;25&quot;;\n\tallUsers = model(&quot;user&quot;).myCustomQuery( page=params.page, perPage=params.perPage);\n\n\t// Because we're going to let `cfoutput`/`cfloop` handle the pagination,\n\t// we're going to need to get some addition information about the pagination.\n\tpaginationData = pagination(&quot;myCustomQueryHandle&quot;)\n}\n\n&lt;!--- View code (using `cfloop`): Use the information from `paginationData` to page through the records ---&gt;\n&lt;ul&gt;\n\t&lt;cfloop query=&quot;allUsers&quot; startrow=&quot;#paginationData.startrow#&quot; endrow=&quot;#paginationData.endrow#&quot; &gt;\n\t&lt;li&gt; #allUsers.firstName# #allUsers.lastName# &lt;/li&gt;\n\t&lt;/cfloop&gt;\n&lt;/ul&gt;\n#paginationLinks(handle=&quot;myCustomQueryHandle&quot;)#\n\n&lt;!--- View code (using `cfoutput`) Use the information from `paginationData` to page through the records---&gt;\n&lt;ul&gt;\n\t&lt;cfoutput query=&quot;allUsers&quot; startrow=&quot;#paginationData.startrow#&quot; maxrows=&quot;#paginationData.maxrows#&quot; &gt;\n\t&lt;li&gt; #allUsers.firstName# #allUsers.lastName# &lt;/li&gt;\n\t&lt;/cfoutput&gt;\n&lt;/ul&gt;\n#paginationLinks(handle=&quot;myCustomQueryHandle&quot;)#\n\n//=================== Second method: Handle the pagination through the database\n\n// Model code: In your model (ie. `User.cfc`), create a custom method for your custom query\n\nfunction myCustomQuery(required numeric page, numeric perPage=25){\n\tlocal.customQueryCount=QueryExecute(&quot;SELECT COUNT(*) AS theCount FROM users&quot;,\n\t\t\t\t\t\t\t\t\t\t[], { datasource=get('dataSourceName') });\n\tlocal.customQuery=QueryExecute(&quot;SELECT * FROM users LIMIT ? OFFSET ?&quot;,\n\t\t\t\t\t\t\t\t\t[arguments.page, arguments.perPage],\n\t\t\t\t\t\t\t\t\t{ datasource=get('dataSourceName') });\n\n\t//Notice the we use the value from the first query for `totalRecords`\n\tsetPagination(\n\t\ttotalRecords=local.customQueryCount.theCount,\n\t\tcurrentPage=arguments.page,\n\t\tperPage=arguments.perPage,\n\t\thandle=&quot;myCustomQueryHandle&quot; );\n\n\t// We return the second query\n\treturn local.customQuery;\n}\n\n// Controller code\nfunction list(){\n\tparam name=&quot;params.page&quot; default=&quot;1;\n\tparam name=&quot;params.perPage&quot; default=&quot;25&quot;;\n\tallUsers = model(&quot;user&quot;).myCustomQuery( page=params.page, perPage=params.perPage);\n}\n\n&lt;!--- View code (using `cfloop`)---&gt;\n&lt;ul&gt;\n\t&lt;cfloop query=&quot;allUsers&quot;&gt;\n\t&lt;li&gt; #allUsers.firstName# #allUsers.lastName# &lt;/li&gt;\n\t&lt;/cfloop&gt;\n&lt;/ul&gt;\n#paginationLinks(handle=&quot;myCustomQueryHandle&quot;)#\n\n&lt;!--- View code (using `cfoutput`)---&gt;\n&lt;ul&gt;\n\t&lt;cfoutput query=&quot;allUsers&quot;&gt;\n\t&lt;li&gt; #allUsers.firstName# #allUsers.lastName# &lt;/li&gt;\n\t&lt;/cfoutput&gt;\n&lt;/ul&gt;\n#paginationLinks(handle=&quot;myCustomQueryHandle&quot;)#\n\n</code></pre>"},"hint":"Allows you to set a pagination handle for a custom query so you can perform pagination on it in your view with <code>paginationLinks</code>.\r\n\r\n","returntype":"void","slug":"controller.setPagination","parameters":[{"required":true,"hint":"Total count of records that should be represented by the paginated links.","name":"totalRecords","type":"numeric"},{"default":1,"required":false,"hint":"Page number that should be represented by the data being fetched and the paginated links.","name":"currentPage","type":"numeric"},{"default":25,"required":false,"hint":"Number of records that should be represented on each page of data.","name":"perPage","type":"numeric"},{"default":"query","required":false,"hint":"Name of handle to reference in `paginationLinks`.","name":"handle","type":"string"}],"availableIn":["controller","model","test","migrator","migration","tabledefinition"],"name":"setPagination","tags":{"categoryClass":"paginationfunctions","sectionClass":"controller","category":"Pagination Functions","section":"Controller"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// In `models/User.cfc`, define the primary key as a column called `userID`.\nfunction config(){\n\tsetPrimaryKey(&quot;userID&quot;);\n}</code></pre>"},"hint":"Allows you to pass in the name(s) of the property(s) that should be used as the primary key(s).\r\nPass as a list if defining a composite primary key.\r\nThis function is also aliased as <code>setPrimaryKeys()</code>.\r\n\r\n","returntype":"void","slug":"model.setPrimaryKey","parameters":[{"required":true,"hint":"Property (or list of properties) to set as the primary key.","name":"property","type":"string"}],"availableIn":["model"],"name":"setPrimaryKey","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"modelconfiguration","category":"Miscellaneous Functions","section":"Model Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// In `models/Subscription.cfc`, define the primary key as composite of the columns `customerId` and `publicationId`.\nfunction config(){\n\tsetPrimaryKeys(&quot;customerId,publicationId&quot;);\n}</code></pre>"},"hint":"Alias for <code>setPrimaryKey()</code>.\r\nUse this for better readability when you're setting multiple properties as the primary key.\r\n\r\n","returntype":"void","slug":"model.setPrimaryKeys","parameters":[{"required":true,"hint":"Property (or list of properties) to set as the primary key.","name":"property","type":"string"}],"availableIn":["model"],"name":"setPrimaryKeys","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"modelconfiguration","category":"Miscellaneous Functions","section":"Model Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Update the properties of the object with the params struct containing the values of a form post\nuser = model(&quot;user&quot;).findByKey(1);\nuser.setProperties(params.user);</code></pre>"},"hint":"Allows you to set all the properties of an object at once by passing in a structure with keys matching the property names.\r\n\r\n","returntype":"void","slug":"model.setProperties","parameters":[{"default":"[runtime expression]","required":false,"hint":"The properties you want to set on the object (can also be passed in as named arguments).","name":"properties","type":"struct"}],"availableIn":["model"],"name":"setProperties","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"modelobject","category":"Miscellaneous Functions","section":"Model Object"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>setResponse(newReponse);</code></pre>"},"hint":"Sets content that CFWheels will send to the client in response to the request.\r\n\r\n","returntype":"void","slug":"controller.setResponse","parameters":[{"required":true,"hint":"The content to send to the client.","name":"content","type":"string"}],"availableIn":["controller"],"name":"setResponse","tags":{"categoryClass":"renderingfunctions","sectionClass":"controller","category":"Rendering Functions","section":"Controller"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// In `models/User.cfc`, add a prefix to the default table name of `tbl`.\nfunction config(){\n\tsetTableNamePrefix(&quot;tbl&quot;);\n}</code></pre>"},"hint":"Sets a prefix to prepend to the table name when this model runs SQL queries.\r\n\r\n","returntype":"void","slug":"model.setTableNamePrefix","parameters":[{"required":true,"hint":"A prefix to prepend to the table name.","name":"prefix","type":"string"}],"availableIn":["model"],"name":"setTableNamePrefix","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"modelconfiguration","category":"Miscellaneous Functions","section":"Model Configuration"}},{"extended":{"hasExtended":false,"docs":""},"hint":"Executes before every test case.\r\n\r\n","returntype":"any","slug":"test.setup","parameters":[],"availableIn":["test"],"name":"setup","tags":{"categoryClass":"callbackfunctions","sectionClass":"testmodelconfiguration","category":"Callback Functions","section":"Test Model Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Set verification chain directly in an array.\nsetVerificationChain([\n\t{only=&quot;handleForm&quot;, post=true},\n\t{only=&quot;edit&quot;, get=true, params=&quot;userId&quot;, paramsTypes=&quot;integer&quot;},\n\t{only=&quot;edit&quot;, get=true, params=&quot;userId&quot;, paramsTypes=&quot;integer&quot;, handler=&quot;index&quot;, error=&quot;Invalid userId&quot;}\n]);\n</code></pre>"},"hint":"Use this function if you need a more low level way of setting the entire verification chain for a controller.\r\n\r\n","returntype":"void","slug":"controller.setVerificationChain","parameters":[{"required":true,"hint":"An array of structs, each of which represent an `argumentCollection` that get passed to the `verifies` function. This should represent the entire verification chain that you want to use for this controller.","name":"chain","type":"array"}],"availableIn":["controller"],"name":"setVerificationChain","tags":{"categoryClass":"configurationfunctions","sectionClass":"controller","category":"Configuration Functions","section":"Controller"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;!--- How most of your calls will look. ---&gt;\n#simpleFormat(post.bodyText)#\n\n&lt;!--- Demonstrates what output looks like with specific data. ---&gt;\n&lt;cfsavecontent variable=&quot;comment&quot;&gt;\n\tI love this post!\n\n\tHere's why:\n\t* Short\n\t* Succinct\n\t* Awesome\n&lt;/cfsavecontent&gt;\n#simpleFormat(comment)#\n\n&lt;!---\n\t&lt;p&gt;I love this post!&lt;/p&gt;\n\n\t&lt;p&gt;Here's why:&lt;br&gt;\n\t* Short&lt;br&gt;\n\t* Succinct&lt;br&gt;\n\t* Awesome&lt;/p&gt;\n---&gt;</code></pre>"},"hint":"Returns formatted text using HTML break tags (<code><br></code>) and HTML paragraph elements (<code><p></p></code>) based on the newline characters and carriage returns in the <code>text</code> that is passed in.\r\n\r\n","returntype":"string","slug":"controller.simpleFormat","parameters":[{"required":true,"hint":"The text to format.","name":"text","type":"string"},{"default":true,"required":false,"hint":"Set to `true` to wrap the result in a paragraph HTML element.","name":"wrap","type":"boolean"},{"default":true,"required":false,"hint":"Use this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to `true` to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to `attributes` to only encode attribute values and not tag content.","name":"encode","type":"boolean"}],"availableIn":["controller"],"name":"simpleFormat","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"viewhelpers","category":"Miscellaneous Functions","section":"View Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Singularize a word, will result in &quot;language&quot; \n#singularize(&quot;languages&quot;)#</code></pre>"},"hint":"Returns the singular form of the passed in word.\r\n\r\n","returntype":"string","slug":"controller.singularize","parameters":[{"required":true,"name":"word","type":"string"}],"availableIn":["controller","model","test","mapper","migrator","migration","tabledefinition"],"name":"singularize","tags":{"categoryClass":"stringfunctions","sectionClass":"globalhelpers","category":"String Functions","section":"Global Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;!--- View Code ---&gt;\n#startFormTag(action=&quot;create&quot;)#\n    &lt;!--- your form controls ---&gt;\n#endFormTag()#\n</code></pre>"},"hint":"Builds and returns a string containing the opening <code>form</code> tag.\r\nThe form's action will be built according to the same rules as <code>URLFor</code>.\r\nNote: Pass any additional arguments like <code>class</code>, <code>rel</code>, and <code>id</code>, and the generated tag will also include those values as HTML attributes.\r\n\r\n","returntype":"string","slug":"controller.startFormTag","parameters":[{"default":"post","required":false,"hint":"The type of `method` to use in the `form` tag (`delete`, `get`, `patch`, `post`, and `put` are the options).","name":"method","type":"string"},{"default":false,"required":false,"hint":"Set to `true` if the form should be able to upload files.","name":"multipart","type":"boolean"},{"default":"","required":false,"hint":"Name of a route that you have configured in `config/routes.cfm`.","name":"route","type":"string"},{"default":"","required":false,"hint":"Name of the controller to include in the URL.","name":"controller","type":"string"},{"default":"","required":false,"hint":"Name of the action to include in the URL.","name":"action","type":"string"},{"default":"","required":false,"hint":"Key(s) to include in the URL.","name":"key","type":"any"},{"default":"","required":false,"hint":"Any additional parameters to be set in the query string (example: wheels=cool&x=y). Please note that CFWheels uses the & and = characters to split the parameters and encode them properly for you. However, if you need to pass in & or = as part of the value, then you need to encode them (and only them), example: a=cats%26dogs%3Dtrouble!&b=1.","name":"params","type":"string"},{"default":"","required":false,"hint":"Sets an anchor name to be appended to the path.","name":"anchor","type":"string"},{"default":true,"required":false,"hint":"If true, returns only the relative URL (no protocol, host name or port).","name":"onlyPath","type":"boolean"},{"default":"","required":false,"hint":"Set this to override the current host.","name":"host","type":"string"},{"default":"","required":false,"hint":"Set this to override the current protocol.","name":"protocol","type":"string"},{"default":0,"required":false,"hint":"Set this to override the current port number.","name":"port","type":"numeric"},{"default":"","required":false,"hint":"String to prepend to the form control. Useful to wrap the form control with HTML tags.","name":"prepend","type":"string"},{"default":"","required":false,"hint":"String to append to the form control. Useful to wrap the form control with HTML tags.","name":"append","type":"string"},{"default":true,"required":false,"hint":"Use this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to `true` to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to `attributes` to only encode attribute values and not tag content.","name":"encode","type":"any"}],"availableIn":["controller"],"name":"startFormTag","tags":{"categoryClass":"generalformfunctions","sectionClass":"viewhelpers","category":"General Form Functions","section":"View Helpers"}},{"extended":{"hasExtended":false,"docs":""},"hint":"adds string columns to table definition\r\n\r\n","returntype":"any","slug":"tabledefinition.string","parameters":[{"required":false,"name":"columnNames","type":"string"},{"required":false,"name":"limit","type":"any"},{"required":false,"name":"default","type":"string"},{"required":false,"name":"null","type":"boolean"}],"availableIn":["tabledefinition"],"name":"string","tags":{"categoryClass":"tabledefinitionfunctions","sectionClass":"migrator","category":"Table Definition Functions","section":"Migrator"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;!--- Will output: &lt;strong&gt;Wheels&lt;/strong&gt; is a framework for ColdFusion. ---&gt;\n#stripLinks('&lt;strong&gt;Wheels&lt;/strong&gt; is a framework for &lt;a href=&quot;http://www.adobe.com/products/coldfusion&quot;&gt;ColdFusion&lt;/a&gt;.')#</code></pre>"},"hint":"Removes all links from an HTML string, leaving just the link text.\r\n\r\n","returntype":"string","slug":"controller.stripLinks","parameters":[{"required":true,"hint":"The HTML to remove links from.","name":"html","type":"string"},{"default":true,"required":false,"hint":"Use this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to `true` to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to `attributes` to only encode attribute values and not tag content.","name":"encode","type":"boolean"}],"availableIn":["controller"],"name":"stripLinks","tags":{"categoryClass":"sanitizationfunctions","sectionClass":"viewhelpers","category":"Sanitization Functions","section":"View Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;!--- Will output: CFWheels is a framework for ColdFusion. ---&gt;\n#stripTags('&lt;strong&gt;Wheels&lt;/strong&gt; is a framework for &lt;a href=&quot;http://www.adobe.com/products/coldfusion&quot;&gt;ColdFusion&lt;/a&gt;.')#</code></pre>"},"hint":"Removes all HTML tags from a string.\r\n\r\n","returntype":"string","slug":"controller.stripTags","parameters":[{"required":true,"hint":"The HTML to remove tag markup from.","name":"html","type":"string"},{"default":true,"required":false,"hint":"Use this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to `true` to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to `attributes` to only encode attribute values and not tag content.","name":"encode","type":"boolean"}],"availableIn":["controller"],"name":"stripTags","tags":{"categoryClass":"sanitizationfunctions","sectionClass":"viewhelpers","category":"Sanitization Functions","section":"View Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;!--- view code ---&gt;\n&lt;head&gt;\n    &lt;!--- Includes `stylesheets/styles.css` ---&gt;\n    #styleSheetLinkTag(&quot;styles&quot;)#\n    &lt;!--- Includes `stylesheets/blog.css` and `stylesheets/comments.css` ---&gt;\n    #styleSheetLinkTag(&quot;blog,comments&quot;)#\n    &lt;!--- Includes printer style sheet ---&gt;\n    #styleSheetLinkTag(sources=&quot;print&quot;, media=&quot;print&quot;)#\n    &lt;!--- Includes external style sheet ---&gt;\n    #styleSheetLinkTag(&quot;http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.0/themes/cupertino/jquery-ui.css&quot;)#\n&lt;/head&gt;\n\n&lt;body&gt;\n    &lt;!--- This will still appear in the `head` ---&gt;\n    #styleSheetLinkTag(sources=&quot;tabs&quot;, head=true)#\n&lt;/body&gt;</code></pre>"},"hint":"Returns a <code>link</code> tag for a stylesheet (or several) based on the supplied arguments.\r\n\r\n","returntype":"string","slug":"controller.styleSheetLinkTag","parameters":[{"default":"","required":false,"hint":"The name of one or many CSS files in the stylesheets folder, minus the `.css` extension. Pass a full URL to generate a tag for an external style sheet. Can also be called with the `source` argument.","name":"sources","type":"string"},{"default":"text/css","required":false,"hint":"The `type` attribute for the `link` tag.","name":"type","type":"string"},{"default":"all","required":false,"hint":"The `media` attribute for the `link` tag.","name":"media","type":"string"},{"required":false,"hint":"The `rel` attribute for the relation between the tag and href.","name":"rel","type":"string"},{"default":false,"required":false,"hint":"Set to `true` to place the output in the `head` area of the HTML page instead of the default behavior (which is to place the output where the function is called from).","name":"head","type":"boolean"},{"default":",","required":false,"hint":"The delimiter to use for the list of CSS files.","name":"delim","type":"string"},{"default":true,"required":false,"hint":"Use this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to `true` to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to `attributes` to only encode attribute values and not tag content.","name":"encode","type":"boolean"}],"availableIn":["controller"],"name":"styleSheetLinkTag","tags":{"categoryClass":"assetfunctions","sectionClass":"viewhelpers","category":"Asset Functions","section":"View Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>#startFormTag(action=&quot;something&quot;)#\n    &lt;!--- form controls go here ---&gt;\n    #submitTag()#\n#endFormTag()#\n</code></pre>"},"hint":"Builds and returns a string containing a submit button form control.\r\nNote: Pass any additional arguments like class, rel, and id, and the generated tag will also include those values as HTML attributes.\r\n\r\n","returntype":"string","slug":"controller.submitTag","parameters":[{"default":"Save changes","required":false,"hint":"Message to display in the button form control.","name":"value","type":"string"},{"default":"","required":false,"hint":"File name of the image file to use in the button form control.","name":"image","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control. Useful to wrap the form control with HTML tags.","name":"prepend","type":"string"},{"default":"","required":false,"hint":"String to append to the form control. Useful to wrap the form control with HTML tags.","name":"append","type":"string"},{"default":true,"required":false,"hint":"Use this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to `true` to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to `attributes` to only encode attribute values and not tag content.","name":"encode","type":"any"}],"availableIn":["controller"],"name":"submitTag","tags":{"categoryClass":"generalformfunctions","sectionClass":"viewhelpers","category":"General Form Functions","section":"View Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Get the sum of all salaries\nallSalaries = model(&quot;employee&quot;).sum(&quot;salary&quot;);\n\n// Get the sum of all salaries for employees in a given country\nallAustralianSalaries = model(&quot;employee&quot;).sum(property=&quot;salary&quot;, include=&quot;country&quot;, where=&quot;countryname='Australia'&quot;);\n\n// Make sure a numeric value is always returned, even if there are no records analyzed by the query\nsalarySum = model(&quot;employee&quot;).sum(property=&quot;salary&quot;, where=&quot;salary BETWEEN #params.min# AND #params.max#&quot;, ifNull=0);</code></pre>"},"hint":"Calculates the sum of values for a given property.\r\nUses the SQL function <code>SUM</code>.\r\nIf no records can be found to perform the calculation on you can use the <code>ifNull</code> argument to decide what should be returned.\r\n\r\n","returntype":"any","slug":"model.sum","parameters":[{"required":true,"hint":"Name of the property to get the sum for (must be a property of a numeric data type).","name":"property","type":"string"},{"default":"","required":false,"hint":"Maps to the `WHERE` clause of the query (or `HAVING` when necessary). The following operators are supported: `=`, `!=`, `<>`, `<`, `<=`, `>`, `>=`, `LIKE`, `NOT LIKE`, `IN`, `NOT IN`, `IS NULL`, `IS NOT NULL`, `AND`, and `OR` (note that the key words need to be written in upper case). You can also use parentheses to group statements. You do not need to specify the table name(s); CFWheels will do that for you.","name":"where","type":"string"},{"default":"","required":false,"hint":"Associations that should be included in the query using `INNER` or `LEFT OUTER` joins (which join type that is used depends on how the association has been set up in your model). If all included associations are set on the current model, you can specify them in a list (e.g. `department,addresses,emails`). You can build more complex include strings by using parentheses when the association is set on an included model, like `album(artist(genre))`, for example. These complex `include` strings only work when `returnAs` is set to `query` though.","name":"include","type":"string"},{"default":false,"required":false,"hint":"When true, SUM returns the sum of unique values only.","name":"distinct","type":"boolean"},{"default":true,"required":false,"hint":"Set to `true` to use `cfqueryparam` on all columns, or pass in a list of property names to use `cfqueryparam` on those only.","name":"parameterize","type":"any"},{"default":"","required":false,"hint":"The value returned if no records are found. Common usage is to set this to `0` to make sure a numeric value is always returned instead of a blank string.","name":"ifNull","type":"any"},{"default":"false","required":false,"hint":"Set to `true` to include soft-deleted records in the queries that this method runs.","name":"includeSoftDeletes","type":"boolean"},{"required":false,"hint":"Maps to the `GROUP BY` clause of the query. You do not need to specify the table name(s); CFWheels will do that for you.","name":"group","type":"string"}],"availableIn":["model"],"name":"sum","tags":{"categoryClass":"statisticsfunctions","sectionClass":"modelclass","category":"Statistics Functions","section":"Model Class"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// In models/User.cfc.\nfunction config() {\n\t// Tell Wheels to use the `tbl_USERS` table in the database for the `user` model instead of the default (which would be `users`).\n\ttable(&quot;tbl_USERS&quot;);\n}</code></pre>"},"hint":"Use this method to tell CFWheels what database table to connect to for this model.\r\nYou only need to use this method when your table naming does not follow the standard CFWheels convention of a singular object name mapping to a plural table name.\r\nTo not use a table for your model at all, call <code>table(false)</code>.\r\n\r\n","returntype":"void","slug":"model.table","parameters":[{"required":true,"hint":"Name of the table to map this model to.","name":"name","type":"any"}],"availableIn":["model"],"name":"table","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"modelconfiguration","category":"Miscellaneous Functions","section":"Model Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Check what table the user model uses\nwhatAmIMappedTo = model(&quot;user&quot;).tableName();</code></pre>"},"hint":"Returns the name of the database table that this model is mapped to.\r\n\r\n","returntype":"string","slug":"model.tableName","parameters":[],"availableIn":["model"],"name":"tableName","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"modelclass","category":"Miscellaneous Functions","section":"Model Class"}},{"extended":{"hasExtended":false,"docs":""},"hint":"Executes after every test case.\r\n\r\n","returntype":"any","slug":"test.teardown","parameters":[],"availableIn":["test"],"name":"teardown","tags":{"categoryClass":"callbackfunctions","sectionClass":"testmodelconfiguration","category":"Callback Functions","section":"Test Model Configuration"}},{"extended":{"hasExtended":false,"docs":""},"hint":"An example test.","returntype":"any","slug":"test.testExample","parameters":[],"availableIn":["test"],"name":"testExample","tags":{"categoryClass":"","sectionClass":"","category":"","section":""}},{"extended":{"hasExtended":false,"docs":""},"hint":"adds text columns to table definition\r\n\r\n","returntype":"any","slug":"tabledefinition.text","parameters":[{"required":false,"name":"columnNames","type":"string"},{"required":false,"name":"default","type":"string"},{"required":false,"name":"null","type":"boolean"}],"availableIn":["tabledefinition"],"name":"text","tags":{"categoryClass":"tabledefinitionfunctions","sectionClass":"migrator","category":"Table Definition Functions","section":"Migrator"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;!--- \tProvide `label` and required `objectName` and `property` ---&gt;\n#textArea(label=&quot;Overview&quot;, objectName=&quot;article&quot;, property=&quot;overview&quot;)#\n\n&lt;!--- Display fields for photos provided by the `screenshots` association and nested properties ---&gt;\n&lt;fieldset&gt;\n\t&lt;legend&gt;Screenshots&lt;/legend&gt;\n\t&lt;cfloop from=&quot;1&quot; to=&quot;#ArrayLen(site.screenshots)#&quot; index=&quot;i&quot;&gt;\n\t\t#fileField(label=&quot;File #i#&quot;, objectName=&quot;site&quot;, association=&quot;screenshots&quot;, position=i, property=&quot;file&quot;)#\n\t\t#textArea(label=&quot;Caption ##i#&quot;, objectName=&quot;site&quot;, association=&quot;screenshots&quot;, position=i, property=&quot;caption&quot;)#\n\t&lt;/cfloop&gt;\n&lt;/fieldset&gt;</code></pre>"},"hint":"Builds and returns a string containing a text area field form control based on the supplied objectName and property.\r\nNote: Pass any additional arguments like class, rel, and id, and the generated tag will also include those values as HTML attributes.\r\n\r\n","returntype":"string","slug":"controller.textArea","parameters":[{"required":true,"hint":"The variable name of the object to build the form control for.","name":"objectName","type":"any"},{"required":true,"hint":"The name of the property to use in the form control.","name":"property","type":"string"},{"required":false,"hint":"The name of the association that the property is located on. Used for building nested forms that work with nested properties. If you are building a form with deep nesting, simply pass in a list to the nested object, and CFWheels will figure it out.","name":"association","type":"string"},{"required":false,"hint":"The position used when referencing a hasMany relationship in the association argument. Used for building nested forms that work with nested properties. If you are building a form with deep nestings, simply pass in a list of positions, and CFWheels will figure it out.","name":"position","type":"string"},{"default":"useDefaultLabel","required":false,"hint":"The label text to use in the form control.","name":"label","type":"string"},{"default":"around","required":false,"hint":"Whether to place the label before, after, or wrapped around the form control. Label text placement can be controlled using aroundLeft or aroundRight.","name":"labelPlacement","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control. Useful to wrap the form control with HTML tags.","name":"prepend","type":"string"},{"default":"","required":false,"hint":"String to append to the form control. Useful to wrap the form control with HTML tags.","name":"append","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control's label. Useful to wrap the form control with HTML tags.","name":"prependToLabel","type":"string"},{"default":"","required":false,"hint":"String to append to the form control's label. Useful to wrap the form control with HTML tags.","name":"appendToLabel","type":"string"},{"default":"span","required":false,"hint":"HTML tag to wrap the form control with when the object contains errors.","name":"errorElement","type":"string"},{"default":"field-with-errors","required":false,"hint":"The class name of the HTML tag that wraps the form control when there are errors.","name":"errorClass","type":"string"},{"default":true,"required":false,"hint":"Use this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to `true` to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to `attributes` to only encode attribute values and not tag content.","name":"encode","type":"any"}],"availableIn":["controller"],"name":"textArea","tags":{"categoryClass":"formobjectfunctions","sectionClass":"viewhelpers","category":"Form Object Functions","section":"View Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;!--- Basic usage usually involves a `label`, `name`, and `password` ---&gt;\n#textAreaTag(label=&quot;Description&quot;, name=&quot;description&quot;, content=params.description)#</code></pre>"},"hint":"Builds and returns a string containing a text area form control based on the supplied name.\r\nNote: Pass any additional arguments like <code>class</code>, <code>rel</code>, and <code>id</code>, and the generated tag will also include those values as HTML attributes.\r\n\r\n","returntype":"string","slug":"controller.textAreaTag","parameters":[{"required":true,"hint":"Name to populate in tag's name attribute.","name":"name","type":"string"},{"default":"","required":false,"hint":"Content to display in textarea on page load.","name":"content","type":"string"},{"default":"","required":false,"hint":"The label text to use in the form control.","name":"label","type":"string"},{"default":"around","required":false,"hint":"Whether to place the label before, after, or wrapped around the form control. Label text placement can be controlled using aroundLeft or aroundRight.","name":"labelPlacement","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control. Useful to wrap the form control with HTML tags.","name":"prepend","type":"string"},{"default":"","required":false,"hint":"String to append to the form control. Useful to wrap the form control with HTML tags.","name":"append","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control's label. Useful to wrap the form control with HTML tags.","name":"prependToLabel","type":"string"},{"default":"","required":false,"hint":"String to append to the form control's label. Useful to wrap the form control with HTML tags.","name":"appendToLabel","type":"string"},{"default":true,"required":false,"hint":"Use this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to `true` to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to `attributes` to only encode attribute values and not tag content.","name":"encode","type":"any"}],"availableIn":["controller"],"name":"textAreaTag","tags":{"categoryClass":"formtagfunctions","sectionClass":"viewhelpers","category":"Form Tag Functions","section":"View Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;!--- Provide a `label` and the required `objectName` and `property` ---&gt;\n#textField(label=&quot;First Name&quot;, objectName=&quot;user&quot;, property=&quot;firstName&quot;)#\n\n&lt;!--- Display fields for phone numbers provided by the `phoneNumbers` association and nested properties ---&gt;\n&lt;fieldset&gt;\n\t&lt;legend&gt;Phone Numbers&lt;/legend&gt;\n\t&lt;cfloop from=&quot;1&quot; to=&quot;#ArrayLen(contact.phoneNumbers)#&quot; index=&quot;i&quot;&gt;\n\t\t#textField(label=&quot;Phone ##i#&quot;, objectName=&quot;contact&quot;, association=&quot;phoneNumbers&quot;, position=i, property=&quot;phoneNumber&quot;)#\n\t&lt;/cfloop&gt;\n&lt;/fieldset&gt;</code></pre>"},"hint":"Builds and returns a string containing a text field form control based on the supplied objectName and property.\r\nNote: Pass any additional arguments like class, rel, and id, and the generated tag will also include those values as HTML attributes.\r\n\r\n","returntype":"string","slug":"controller.textField","parameters":[{"required":true,"hint":"The variable name of the object to build the form control for.","name":"objectName","type":"any"},{"required":true,"hint":"The name of the property to use in the form control.","name":"property","type":"string"},{"required":false,"hint":"The name of the association that the property is located on. Used for building nested forms that work with nested properties. If you are building a form with deep nesting, simply pass in a list to the nested object, and CFWheels will figure it out.","name":"association","type":"string"},{"required":false,"hint":"The position used when referencing a hasMany relationship in the association argument. Used for building nested forms that work with nested properties. If you are building a form with deep nestings, simply pass in a list of positions, and CFWheels will figure it out.","name":"position","type":"string"},{"default":"useDefaultLabel","required":false,"hint":"The label text to use in the form control.","name":"label","type":"string"},{"default":"around","required":false,"hint":"Whether to place the label before, after, or wrapped around the form control. Label text placement can be controlled using aroundLeft or aroundRight.","name":"labelPlacement","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control. Useful to wrap the form control with HTML tags.","name":"prepend","type":"string"},{"default":"","required":false,"hint":"String to append to the form control. Useful to wrap the form control with HTML tags.","name":"append","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control's label. Useful to wrap the form control with HTML tags.","name":"prependToLabel","type":"string"},{"default":"","required":false,"hint":"String to append to the form control's label. Useful to wrap the form control with HTML tags.","name":"appendToLabel","type":"string"},{"default":"span","required":false,"hint":"HTML tag to wrap the form control with when the object contains errors.","name":"errorElement","type":"string"},{"default":"field-with-errors","required":false,"hint":"The class name of the HTML tag that wraps the form control when there are errors.","name":"errorClass","type":"string"},{"default":"text","required":false,"hint":"Input type attribute. Common examples in HTML5 and later are text (default), email, tel, and url.","name":"type","type":"string"},{"default":true,"required":false,"hint":"Use this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to `true` to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to `attributes` to only encode attribute values and not tag content.","name":"encode","type":"any"}],"availableIn":["controller"],"name":"textField","tags":{"categoryClass":"formobjectfunctions","sectionClass":"viewhelpers","category":"Form Object Functions","section":"View Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;!--- Basic usage usually involves a `label`, `name`, and `value` ---&gt;\n#textFieldTag(label=&quot;Search&quot;, name=&quot;q&quot;, value=params.q)#</code></pre>"},"hint":"Builds and returns a string containing a text field form control based on the supplied name.\r\nNote: Pass any additional arguments like <code>class</code>, <code>rel</code>, and <code>id</code>, and the generated tag will also include those values as HTML attributes.\r\n\r\n","returntype":"string","slug":"controller.textFieldTag","parameters":[{"required":true,"hint":"Name to populate in tag's name attribute.","name":"name","type":"string"},{"default":"","required":false,"hint":"Value to populate in tag's value attribute.","name":"value","type":"string"},{"default":"","required":false,"hint":"The label text to use in the form control.","name":"label","type":"string"},{"default":"around","required":false,"hint":"Whether to place the label before, after, or wrapped around the form control. Label text placement can be controlled using aroundLeft or aroundRight.","name":"labelPlacement","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control. Useful to wrap the form control with HTML tags.","name":"prepend","type":"string"},{"default":"","required":false,"hint":"String to append to the form control. Useful to wrap the form control with HTML tags.","name":"append","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control's label. Useful to wrap the form control with HTML tags.","name":"prependToLabel","type":"string"},{"default":"","required":false,"hint":"String to append to the form control's label. Useful to wrap the form control with HTML tags.","name":"appendToLabel","type":"string"},{"default":"text","required":false,"hint":"Input type attribute. Common examples in HTML5 and later are text (default), email, tel, and url.","name":"type","type":"string"},{"default":true,"required":false,"hint":"Use this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to `true` to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to `attributes` to only encode attribute values and not tag content.","name":"encode","type":"any"}],"availableIn":["controller"],"name":"textFieldTag","tags":{"categoryClass":"formtagfunctions","sectionClass":"viewhelpers","category":"Form Tag Functions","section":"View Helpers"}},{"extended":{"hasExtended":false,"docs":""},"hint":"adds time columns to table definition\r\n\r\n","returntype":"any","slug":"tabledefinition.time","parameters":[{"required":false,"name":"columnNames","type":"string"},{"required":false,"name":"default","type":"string"},{"required":false,"name":"null","type":"boolean"}],"availableIn":["tabledefinition"],"name":"time","tags":{"categoryClass":"tabledefinitionfunctions","sectionClass":"migrator","category":"Table Definition Functions","section":"Migrator"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Controller code.\naWhileAgo = DateAdd(&quot;d&quot;, -90, Now());\n\n// View code.\n&lt;!--- Will output: 3 months ---&gt;\n#timeAgoInWords(aWhileAgo)#\n</code></pre>"},"hint":"Returns a string describing the approximate time difference between the date passed in and the current date.\r\n\r\n","returntype":"any","slug":"controller.timeAgoInWords","parameters":[{"required":true,"hint":"Date to compare from.","name":"fromTime","type":"date"},{"default":false,"required":false,"hint":"Whether or not to include the number of seconds in the returned string.","name":"includeSeconds","type":"boolean"},{"default":"[runtime expression]","required":false,"hint":"Date to compare to.","name":"toTime","type":"date"}],"availableIn":["controller","model","test","migrator","migration","tabledefinition"],"name":"timeAgoInWords","tags":{"categoryClass":"datefunctions","sectionClass":"globalhelpers","category":"Date Functions","section":"Global Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;!---View code ---&gt;\n#timeSelect(objectName=&quot;business&quot;, property=&quot;openUntil&quot;)#\n\n&lt;!---Show fields for hour and minute ---&gt;\n#timeSelect(objectName=&quot;business&quot;, property=&quot;openUntil&quot;, order=&quot;hour,minute&quot;)#\n\n&lt;!---Only show 15-minute intervals ---&gt;\n#timeSelect(objectName=&quot;appointment&quot;, property=&quot;dateTimeStart&quot;, minuteStep=15)#</code></pre>"},"hint":"Builds and returns a string containing three <code>select</code> form controls for hour, minute, and second based on the supplied objectName and property.\r\n\r\n","returntype":"string","slug":"controller.timeSelect","parameters":[{"default":"","required":false,"hint":"The variable name of the object to build the form control for.","name":"objectName","type":"any"},{"default":"","required":false,"hint":"The name of the property to use in the form control.","name":"property","type":"string"},{"required":false,"hint":"The name of the association that the property is located on. Used for building nested forms that work with nested properties. If you are building a form with deep nesting, simply pass in a list to the nested object, and CFWheels will figure it out.","name":"association","type":"string"},{"required":false,"hint":"The position used when referencing a hasMany relationship in the association argument. Used for building nested forms that work with nested properties. If you are building a form with deep nestings, simply pass in a list of positions, and CFWheels will figure it out.","name":"position","type":"string"},{"default":"hour,minute,second","required":false,"hint":"Use to change the order of or exclude time select tags.","name":"order","type":"string"},{"default":":","required":false,"hint":"Use to change the character that is displayed between the time select tags.","name":"separator","type":"string"},{"default":1,"required":false,"hint":"Pass in 10 to only show minute 10, 20, 30, etc.","name":"minuteStep","type":"numeric"},{"default":1,"required":false,"hint":"Pass in 10 to only show seconds 10, 20, 30, etc.","name":"secondStep","type":"numeric"},{"default":false,"required":false,"hint":"Whether to include a blank option in the select form control. Pass true to include a blank line or a string that should represent what display text should appear for the empty value (for example, \"- Select One -\").","name":"includeBlank","type":"any"},{"default":false,"required":false,"hint":"The label text to use in the form control.","name":"label","type":"string"},{"default":"around","required":false,"hint":"Whether to place the label before, after, or wrapped around the form control. Label text placement can be controlled using aroundLeft or aroundRight.","name":"labelPlacement","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control. Useful to wrap the form control with HTML tags.","name":"prepend","type":"string"},{"default":"","required":false,"hint":"String to append to the form control. Useful to wrap the form control with HTML tags.","name":"append","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control's label. Useful to wrap the form control with HTML tags.","name":"prependToLabel","type":"string"},{"default":"","required":false,"hint":"String to append to the form control's label. Useful to wrap the form control with HTML tags.","name":"appendToLabel","type":"string"},{"default":"span","required":false,"hint":"HTML tag to wrap the form control with when the object contains errors.","name":"errorElement","type":"string"},{"default":"field-with-errors","required":false,"hint":"The class name of the HTML tag that wraps the form control when there are errors.","name":"errorClass","type":"string"},{"required":false,"hint":"Set to false to not combine the select parts into a single DateTime object.","name":"combine","type":"boolean"},{"default":false,"required":false,"hint":"whether to display the hours in 24 or 12 hour format. 12 hour format has AM/PM drop downs","name":"twelveHour","type":"boolean"},{"default":true,"required":false,"hint":"Use this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to `true` to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to `attributes` to only encode attribute values and not tag content.","name":"encode","type":"any"}],"availableIn":["controller"],"name":"timeSelect","tags":{"categoryClass":"formobjectfunctions","sectionClass":"viewhelpers","category":"Form Object Functions","section":"View Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;!--- This &quot;Tag&quot; version of function accepts `name` and `selected` instead of binding to a model object ---&gt;\n#timeSelectTags(name=&quot;timeOfMeeting&quot; selected=params.timeOfMeeting)#\n\n&lt;!--- Show fields for `hour` and `minute` only ---&gt;\n#timeSelectTags(name=&quot;timeOfMeeting&quot;, selected=params.timeOfMeeting, order=&quot;hour,minute&quot;)#\n</code></pre>"},"hint":"Builds and returns a string containing three <code>select</code> form controls for hour, minute, and second based on name.\r\n\r\n","returntype":"string","slug":"controller.timeSelectTags","parameters":[{"required":true,"hint":"Name to populate in tag's name attribute.","name":"name","type":"string"},{"default":"","required":false,"hint":"Value of option that should be selected by default.","name":"selected","type":"string"},{"default":"hour,minute,second","required":false,"hint":"Use to change the order of or exclude time select tags.","name":"order","type":"string"},{"default":":","required":false,"hint":"Use to change the character that is displayed between the time select tags.","name":"separator","type":"string"},{"default":1,"required":false,"hint":"Pass in 10 to only show minute 10, 20, 30, etc.","name":"minuteStep","type":"numeric"},{"default":1,"required":false,"hint":"Pass in 10 to only show seconds 10, 20, 30, etc.","name":"secondStep","type":"numeric"},{"default":false,"required":false,"hint":"Whether to include a blank option in the select form control. Pass true to include a blank line or a string that should represent what display text should appear for the empty value (for example, \"- Select One -\").","name":"includeBlank","type":"any"},{"default":"","required":false,"hint":"The label text to use in the form control.","name":"label","type":"string"},{"default":"around","required":false,"hint":"Whether to place the label before, after, or wrapped around the form control. Label text placement can be controlled using aroundLeft or aroundRight.","name":"labelPlacement","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control. Useful to wrap the form control with HTML tags.","name":"prepend","type":"string"},{"default":"","required":false,"hint":"String to append to the form control. Useful to wrap the form control with HTML tags.","name":"append","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control's label. Useful to wrap the form control with HTML tags.","name":"prependToLabel","type":"string"},{"default":"","required":false,"hint":"String to append to the form control's label. Useful to wrap the form control with HTML tags.","name":"appendToLabel","type":"string"},{"required":false,"hint":"Set to false to not combine the select parts into a single DateTime object.","name":"combine","type":"boolean"},{"default":false,"required":false,"hint":"whether to display the hours in 24 or 12 hour format. 12 hour format has AM/PM drop downs","name":"twelveHour","type":"boolean"},{"default":true,"required":false,"hint":"Use this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to `true` to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to `attributes` to only encode attribute values and not tag content.","name":"encode","type":"any"}],"availableIn":["controller"],"name":"timeSelectTags","tags":{"categoryClass":"formtagfunctions","sectionClass":"viewhelpers","category":"Form Tag Functions","section":"View Helpers"}},{"extended":{"hasExtended":false,"docs":""},"hint":"adds timestamp columns to table definition\r\n\r\n","returntype":"any","slug":"tabledefinition.timestamp","parameters":[{"required":false,"name":"columnNames","type":"string"},{"required":false,"name":"default","type":"string"},{"required":false,"name":"null","type":"boolean"},{"default":"datetime","required":false,"name":"columnType","type":"string"}],"availableIn":["tabledefinition"],"name":"timestamp","tags":{"categoryClass":"tabledefinitionfunctions","sectionClass":"migrator","category":"Table Definition Functions","section":"Migrator"}},{"extended":{"hasExtended":false,"docs":""},"hint":"adds CFWheels convention automatic timestamp and soft delete columns to table definition\r\n\r\n","returntype":"any","slug":"tabledefinition.timestamps","parameters":[],"availableIn":["tabledefinition"],"name":"timestamps","tags":{"categoryClass":"tabledefinitionfunctions","sectionClass":"migrator","category":"Table Definition Functions","section":"Migrator"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Controller code.\naLittleAhead = DateAdd(&quot;d&quot;, 365, Now());\n\n// View code.\n&lt;!--- Will output: about 1 year ---&gt;\n#timeUntilInWords(aLittleAhead)#\n</code></pre>"},"hint":"Returns a string describing the approximate time difference between the current date and the date passed in.\r\n\r\n","returntype":"string","slug":"controller.timeUntilInWords","parameters":[{"required":true,"hint":"Date to compare to.","name":"toTime","type":"date"},{"default":false,"required":false,"hint":"Whether or not to include the number of seconds in the returned string.","name":"includeSeconds","type":"boolean"},{"default":"[runtime expression]","required":false,"hint":"Date to compare from.","name":"fromTime","type":"date"}],"availableIn":["controller","model","test","migrator","migration","tabledefinition"],"name":"timeUntilInWords","tags":{"categoryClass":"datefunctions","sectionClass":"globalhelpers","category":"Date Functions","section":"Global Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;!--- Will output: CFWheels Is A Framework For ColdFusion ---&gt;\n#titleize(&quot;CFWheels is a framework for ColdFusion&quot;)#</code></pre>"},"hint":"Capitalizes all words in the text to create a nicer looking title.\r\n\r\n","returntype":"string","slug":"controller.titleize","parameters":[{"required":true,"hint":"The text to turn into a title.","name":"word","type":"string"}],"availableIn":["controller","model","test","mapper","migrator","migration","tabledefinition"],"name":"titleize","tags":{"categoryClass":"stringfunctions","sectionClass":"globalhelpers","category":"String Functions","section":"Global Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Get an object, and toggle a boolean property\nuser = model(&quot;user&quot;).findByKey(58);\nisSuccess = user.toggle(&quot;isActive&quot;); // returns whether the object was saved properly\n\n// You can also use a dynamic helper for this\nisSuccess = user.toggleIsActive();</code></pre>"},"hint":"Assigns to the property specified the opposite of the property's current boolean value.\r\nThrows an error if the property cannot be converted to a boolean value.\r\nReturns this object if save called internally is <code>false</code>.\r\n\r\n","returntype":"boolean","slug":"model.toggle","parameters":[{"required":true,"name":"property","type":"string"},{"default":true,"required":false,"hint":"Argument to decide whether save the property after it has been toggled.","name":"save","type":"boolean"}],"availableIn":["model"],"name":"toggle","tags":{"categoryClass":"crudfunctions","sectionClass":"modelobject","category":"CRUD Functions","section":"Model Object"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;!--- Will output: CFWheels is a fra... ---&gt;\n#truncate(text=&quot;CFWheels is a framework for ColdFusion&quot;, length=20)#\n\n&lt;!--- Will output: CFWheels is a framework (more) ---&gt;\n#truncate(text=&quot;CFWheels is a framework for ColdFusion&quot;, truncateString=&quot; (more)&quot;)#</code></pre>"},"hint":"Truncates text to the specified length and replaces the last characters with the specified truncate string (which defaults to \"...\").\r\n\r\n","returntype":"string","slug":"controller.truncate","parameters":[{"required":true,"hint":"The text to truncate.","name":"text","type":"string"},{"default":30,"required":false,"hint":"Length to truncate the text to.","name":"length","type":"numeric"},{"default":"...","required":false,"hint":"String to replace the last characters with.","name":"truncateString","type":"string"}],"availableIn":["controller","model","test","migrator","migration","tabledefinition"],"name":"truncate","tags":{"categoryClass":"stringfunctions","sectionClass":"globalhelpers","category":"String Functions","section":"Global Helpers"}},{"extended":{"hasExtended":false,"docs":""},"hint":"adds UUID columns to table definition\r\n\r\n","returntype":"any","slug":"tabledefinition.uniqueidentifier","parameters":[{"required":false,"name":"columnNames","type":"string"},{"default":"newid()","required":false,"name":"default","type":"string"},{"required":false,"name":"null","type":"boolean"}],"availableIn":["tabledefinition"],"name":"uniqueidentifier","tags":{"categoryClass":"tabledefinitionfunctions","sectionClass":"migrator","category":"Table Definition Functions","section":"Migrator"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>function up() {\n\ttransaction {\n\t\ttry {\n\t\t\t// your code goes here\n\t\t\tt = createTable(name='myTable');\n\t\t\tt.timestamps();\n\t\t\tt.create();\n\t\t} catch (any e) {\n\t\t\tlocal.exception = e;\n\t\t}\n\n\t\tif (StructKeyExists(local, &quot;exception&quot;)) {\n\t\t\ttransaction action=&quot;rollback&quot;;\n\t\t\tthrow(errorCode=&quot;1&quot;, detail=local.exception.detail, message=local.exception.message, type=&quot;any&quot;);\n\t\t} else {\n\t\t\ttransaction action=&quot;commit&quot;;\n\t\t}\n\t}\n}\n</code></pre>"},"hint":"Migrates up: will be executed when migrating your schema forward\r\nAlong with down(), these are the two main functions in any migration file\r\nOnly available in a migration CFC\r\n\r\n","returntype":"void","slug":"migration.up","parameters":[],"availableIn":["migration"],"name":"up","tags":{"categoryClass":"migrationfunctions","sectionClass":"migrator","category":"Migration Functions","section":"Migrator"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Get a post object and then update its title in the database\npost = model(&quot;post&quot;).findByKey(33);\npost.update(title=&quot;New version of Wheels just released&quot;);\n\n// Get a post object and then update its title and other properties based on what is pased in from the URL/form\npost = model(&quot;post&quot;).findByKey(params.key);\npost.update(title=&quot;New version of Wheels just released&quot;, properties=params.post);\n\n// If you have a `hasOne` association setup from `author` to `bio`, you can do a scoped call. (The `setBio` method below will call `bio.update(authorId=anAuthor.id)` internally.)\nauthor = model(&quot;author&quot;).findByKey(params.authorId); \nbio = model(&quot;bio&quot;).findByKey(params.bioId); \nauthor.setBio(bio); \n\n// If you have a `hasMany` association setup from `owner` to `car`, you can do a scoped call. (The `addCar` method below will call `car.update(ownerId=anOwner.id)` internally.)\nanOwner = model(&quot;owner&quot;).findByKey(params.ownerId); \naCar = model(&quot;car&quot;).findByKey(params.carId); \nanOwner.addCar(aCar); \n\n// If you have a `hasMany` association setup from `post` to `comment`, you can do a scoped call. (The `removeComment` method below will call `comment.update(postId=&quot;&quot;)` internally.)\naPost = model(&quot;post&quot;).findByKey(params.postId); \naComment = model(&quot;comment&quot;).findByKey(params.commentId); \naPost.removeComment(aComment); // Get an object, and toggle a boolean property\nuser = model(&quot;user&quot;).findByKey(58); \nisSuccess = user.toggle(&quot;isActive&quot;); // returns whether the object was saved properly\n\n// You can also use a dynamic helper for this\nisSuccess = user.toggleIsActive(); \n\n</code></pre>"},"hint":"Updates the object with the supplied <code>properties</code> and saves it to the database.\r\nReturns <code>true</code> if the object was saved successfully to the database and <code>false</code> otherwise.\r\n\r\n","returntype":"boolean","slug":"model.update","parameters":[{"default":"[runtime expression]","required":false,"hint":"The properties you want to set on the object (can also be passed in as named arguments).","name":"properties","type":"struct"},{"default":true,"required":false,"hint":"Set to `true` to use `cfqueryparam` on all columns, or pass in a list of property names to use `cfqueryparam` on those only.","name":"parameterize","type":"any"},{"default":false,"required":false,"hint":"Set to `true` to force CFWheels to query the database even though an identical query for this model may have been run in the same request. (The default in CFWheels is to get the second query from the model's request-level cache.)","name":"reload","type":"boolean"},{"default":true,"required":false,"hint":"Set to `false` to skip validations for this operation.","name":"validate","type":"boolean"},{"default":"[runtime expression]","required":false,"hint":"Set this to `commit` to update the database, `rollback` to run all the database queries but not commit them, or `none` to skip transaction handling altogether.","name":"transaction","type":"string"},{"default":true,"required":false,"hint":"Set to `false` to disable callbacks for this method.","name":"callbacks","type":"boolean"},{"default":false,"required":false,"hint":"Set this to `true` to allow explicit assignment of `createdAt` or `updatedAt` properties","name":"allowExplicitTimestamps","type":"boolean"}],"availableIn":["model"],"name":"update","tags":{"categoryClass":"crudfunctions","sectionClass":"modelobject","category":"CRUD Functions","section":"Model Object"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Update the `published` and `publishedAt` properties for all records that have `published=0`  \nrecordsUpdated = model(&quot;post&quot;).updateAll( published=1, publishedAt=Now(), where=&quot;published=0&quot; );\n\n// If you have a `hasMany` association setup from `post` to `comment`, you can do a scoped call. (The `removeAllComments` method below will call `model(&quot;comment&quot;).updateAll(postid=&quot;&quot;, where=&quot;postId=#post.id#&quot;)` internally.)  \npost = model(&quot;post&quot;).findByKey(params.postId);\npost.removeAllComments();</code></pre>"},"hint":"Updates all properties for the records that match the <code>where</code> argument.\r\nProperty names and values can be passed in either using named arguments or as a struct to the <code>properties</code> argument.\r\nBy default, objects will not be instantiated and therefore callbacks and validations are not invoked.\r\nYou can change this behavior by passing in <code>instantiate=true</code>.\r\nThis method returns the number of records that were updated.\r\n\r\n","returntype":"numeric","slug":"model.updateAll","parameters":[{"default":"","required":false,"hint":"Maps to the `WHERE` clause of the query (or `HAVING` when necessary). The following operators are supported: `=`, `!=`, `<>`, `<`, `<=`, `>`, `>=`, `LIKE`, `NOT LIKE`, `IN`, `NOT IN`, `IS NULL`, `IS NOT NULL`, `AND`, and `OR` (note that the key words need to be written in upper case). You can also use parentheses to group statements. You do not need to specify the table name(s); CFWheels will do that for you.","name":"where","type":"string"},{"default":"","required":false,"hint":"Associations that should be included in the query using `INNER` or `LEFT OUTER` joins (which join type that is used depends on how the association has been set up in your model). If all included associations are set on the current model, you can specify them in a list (e.g. `department,addresses,emails`). You can build more complex include strings by using parentheses when the association is set on an included model, like `album(artist(genre))`, for example. These complex `include` strings only work when `returnAs` is set to `query` though.","name":"include","type":"string"},{"default":"[runtime expression]","required":false,"hint":"The properties you want to set on the object (can also be passed in as named arguments).","name":"properties","type":"struct"},{"default":false,"required":false,"hint":"Set to `true` to force CFWheels to query the database even though an identical query for this model may have been run in the same request. (The default in CFWheels is to get the second query from the model's request-level cache.)","name":"reload","type":"boolean"},{"default":true,"required":false,"hint":"Set to `true` to use `cfqueryparam` on all columns, or pass in a list of property names to use `cfqueryparam` on those only.","name":"parameterize","type":"any"},{"default":false,"required":false,"hint":"Whether or not to instantiate the object(s) first. When objects are not instantiated, any callbacks and validations set on them will be skipped.","name":"instantiate","type":"boolean"},{"default":"true","required":false,"hint":"Set to `false` to skip validations for this operation.","name":"validate","type":"boolean"},{"default":"[runtime expression]","required":false,"hint":"Set this to `commit` to update the database, `rollback` to run all the database queries but not commit them, or `none` to skip transaction handling altogether.","name":"transaction","type":"string"},{"default":"true","required":false,"hint":"Set to `false` to disable callbacks for this method.","name":"callbacks","type":"boolean"},{"default":"false","required":false,"hint":"Set to `true` to include soft-deleted records in the queries that this method runs.","name":"includeSoftDeletes","type":"boolean"}],"availableIn":["model"],"name":"updateAll","tags":{"categoryClass":"updatefunctions","sectionClass":"modelclass","category":"Update Functions","section":"Model Class"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Updates the object with `33` as the primary key value with values passed in through the URL/form\nresult = model(&quot;post&quot;).updateByKey(33, params.post);\n\n// Updates the object with `33` as the primary key using named arguments\nresult = model(&quot;post&quot;).updateByKey(key=33, title=&quot;New version of Wheels just released&quot;, published=1);</code></pre>"},"hint":"Finds the object with the supplied <code>key</code> and saves it (if validation permits it) with the supplied <code>properties</code> and / or named arguments.\r\nProperty names and values can be passed in either using named arguments or as a struct to the <code>properties</code> argument.\r\nReturns <code>true</code> if the object was found and updated successfully, <code>false</code> otherwise.\r\n\r\n","returntype":"boolean","slug":"model.updateByKey","parameters":[{"required":true,"hint":"Primary key value(s) of the record to fetch. Separate with comma if passing in multiple primary key values. Accepts a string, list, or a numeric value.","name":"key","type":"any"},{"default":"[runtime expression]","required":false,"hint":"The properties you want to set on the object (can also be passed in as named arguments).","name":"properties","type":"struct"},{"default":false,"required":false,"hint":"Set to `true` to force CFWheels to query the database even though an identical query for this model may have been run in the same request. (The default in CFWheels is to get the second query from the model's request-level cache.)","name":"reload","type":"boolean"},{"default":"true","required":false,"hint":"Set to `false` to skip validations for this operation.","name":"validate","type":"boolean"},{"default":"[runtime expression]","required":false,"hint":"Set this to `commit` to update the database, `rollback` to run all the database queries but not commit them, or `none` to skip transaction handling altogether.","name":"transaction","type":"string"},{"default":"true","required":false,"hint":"Set to `false` to disable callbacks for this method.","name":"callbacks","type":"boolean"},{"default":"false","required":false,"hint":"Set to `true` to include soft-deleted records in the queries that this method runs.","name":"includeSoftDeletes","type":"boolean"}],"availableIn":["model"],"name":"updateByKey","tags":{"categoryClass":"updatefunctions","sectionClass":"modelclass","category":"Update Functions","section":"Model Class"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Sets the `new` property to `1` on the most recently released product\nresult = model(&quot;product&quot;).updateOne(order=&quot;releaseDate DESC&quot;, new=1);\n\n// If you have a `hasOne` association setup from `user` to `profile`, you can do a scoped call. (The `removeProfile` method below will call `model(&quot;profile&quot;).updateOne(where=&quot;userId=#aUser.id#&quot;, userId=&quot;&quot;)` internally.)\naUser = model(&quot;user&quot;).findByKey(params.userId);\naUser.removeProfile();</code></pre>"},"hint":"Gets an object based on the arguments used and updates it with the supplied <code>properties</code>.\r\nReturns <code>true</code> if an object was found and updated successfully, <code>false</code> otherwise.\r\n\r\n","returntype":"boolean","slug":"model.updateOne","parameters":[{"default":"","required":false,"hint":"Maps to the `WHERE` clause of the query (or `HAVING` when necessary). The following operators are supported: `=`, `!=`, `<>`, `<`, `<=`, `>`, `>=`, `LIKE`, `NOT LIKE`, `IN`, `NOT IN`, `IS NULL`, `IS NOT NULL`, `AND`, and `OR` (note that the key words need to be written in upper case). You can also use parentheses to group statements. You do not need to specify the table name(s); CFWheels will do that for you.","name":"where","type":"string"},{"default":"","required":false,"hint":"Maps to the `ORDER` BY clause of the query. You do not need to specify the table name(s); CFWheels will do that for you.","name":"order","type":"string"},{"default":"[runtime expression]","required":false,"hint":"The properties you want to set on the object (can also be passed in as named arguments).","name":"properties","type":"struct"},{"default":false,"required":false,"hint":"Set to `true` to force CFWheels to query the database even though an identical query for this model may have been run in the same request. (The default in CFWheels is to get the second query from the model's request-level cache.)","name":"reload","type":"boolean"},{"default":"true","required":false,"hint":"Set to `false` to skip validations for this operation.","name":"validate","type":"boolean"},{"default":"[runtime expression]","required":false,"hint":"Set this to `commit` to update the database, `rollback` to run all the database queries but not commit them, or `none` to skip transaction handling altogether.","name":"transaction","type":"string"},{"default":"true","required":false,"hint":"Set to `false` to disable callbacks for this method.","name":"callbacks","type":"boolean"},{"default":"false","required":false,"name":"includeSoftDeletes","type":"boolean"}],"availableIn":["model"],"name":"updateOne","tags":{"categoryClass":"updatefunctions","sectionClass":"modelclass","category":"Update Functions","section":"Model Class"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Sets the `new` property to `1` through updateProperty()\nproduct = model(&quot;product&quot;).findByKey(56);\nproduct.updateProperty(&quot;new&quot;, 1);</code></pre>"},"hint":"Updates a single <code>property</code> and saves the record without going through the normal validation procedure.\r\nThis is especially useful for boolean flags on existing records.\r\n\r\n","returntype":"boolean","slug":"model.updateProperty","parameters":[{"required":false,"hint":"Name of the property to update the value for globally.","name":"property","type":"string"},{"required":false,"hint":"Value to set on the given property globally.","name":"value","type":"any"},{"default":true,"required":false,"hint":"Set to `true` to use `cfqueryparam` on all columns, or pass in a list of property names to use `cfqueryparam` on those only.","name":"parameterize","type":"any"},{"default":"[runtime expression]","required":false,"hint":"Set this to `commit` to update the database, `rollback` to run all the database queries but not commit them, or `none` to skip transaction handling altogether.","name":"transaction","type":"string"},{"default":"true","required":false,"hint":"Set to `false` to disable callbacks for this method.","name":"callbacks","type":"boolean"}],"availableIn":["model"],"name":"updateProperty","tags":{"categoryClass":"crudfunctions","sectionClass":"modelobject","category":"CRUD Functions","section":"Model Object"}},{"extended":{"hasExtended":false,"docs":""},"hint":"Updates an existing record in a table\r\nOnly available in a migration CFC\r\n\r\n","returntype":"void","slug":"migration.updateRecord","parameters":[{"required":true,"hint":"The table name where the record is","name":"table","type":"string"},{"default":"","required":false,"hint":"The where clause, i.e admin = 1","name":"where","type":"string"}],"availableIn":["migration"],"name":"updateRecord","tags":{"categoryClass":"migrationfunctions","sectionClass":"migrator","category":"Migration Functions","section":"Migrator"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;!--- Create the URL for the `logOut` action on the `account` controller, typically resulting in `/account/log-out` ---&gt;\n#urlFor(controller=&quot;account&quot;, action=&quot;logOut&quot;)#\n\n&lt;!--- Create a URL with an anchor set on it ---&gt;\n#urlFor(action=&quot;comments&quot;, anchor=&quot;comment10&quot;)#\n\n&lt;!--- Create a URL based on a route called `products`, which expects params for `categorySlug` and `productSlug` ---&gt;\n#urlFor(route=&quot;product&quot;, categorySlug=&quot;accessories&quot;, productSlug=&quot;battery-charger&quot;)#</code></pre>"},"hint":"Creates an internal URL based on supplied arguments.\r\n\r\n","returntype":"string","slug":"controller.URLFor","parameters":[{"default":"","required":false,"hint":"Name of a route that you have configured in `config/routes.cfm`.","name":"route","type":"string"},{"default":"","required":false,"hint":"Name of the controller to include in the URL.","name":"controller","type":"string"},{"default":"","required":false,"hint":"Name of the action to include in the URL.","name":"action","type":"string"},{"default":"","required":false,"hint":"Key(s) to include in the URL.","name":"key","type":"any"},{"default":"","required":false,"hint":"Any additional parameters to be set in the query string (example: `wheels=cool&x=y`). Please note that CFWheels uses the `&` and `=` characters to split the parameters and encode them properly for you. However, if you need to pass in `&` or `=` as part of the value, then you need to encode them (and only them), example: `a=cats%26dogs%3Dtrouble!&b=1`.","name":"params","type":"string"},{"default":"","required":false,"hint":"Sets an anchor name to be appended to the path.","name":"anchor","type":"string"},{"default":true,"required":false,"hint":"If `true`, returns only the relative URL (no protocol, host name or port).","name":"onlyPath","type":"boolean"},{"default":"","required":false,"hint":"Set this to override the current host.","name":"host","type":"string"},{"default":"","required":false,"hint":"Set this to override the current protocol.","name":"protocol","type":"string"},{"default":0,"required":false,"hint":"Set this to override the current port number.","name":"port","type":"numeric"},{"default":true,"required":false,"hint":"Encode URL parameters using `EncodeForURL()`. Please note that this does not make the string safe for placement in HTML attributes, for that you need to wrap the result in `EncodeForHtmlAttribute()` or use `linkTo()`, `startFormTag()` etc instead.","name":"encode","type":"boolean"},{"default":false,"required":false,"name":"$encodeForHtmlAttribute","type":"boolean"},{"default":"[runtime expression]","required":false,"name":"$URLRewriting","type":"string"}],"availableIn":["controller","model","test","migrator","migration","tabledefinition"],"name":"URLFor","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"globalhelpers","category":"Miscellaneous Functions","section":"Global Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// We want this layout to be used as the default throughout the \n// entire controller, except for the `myAjax` action. \nusesLayout(template=&quot;myLayout&quot;, except=&quot;myAjax&quot;); \n\n// Use a custom layout for these actions but use the default \n// `layout.cfm` for the rest. \nusesLayout(template=&quot;myLayout&quot;, only=&quot;termsOfService,shippingPolicy&quot;); \n\n// Define a custom function to decide which layout to display.\n// The `setLayout` function should return the name of the layout \n// to use or `true` to use the default one. \nusesLayout(&quot;setLayout&quot;);</code></pre>"},"hint":"Used within a controller's <code>config()</code> function to specify controller- or action-specific layouts.\r\n\r\n","returntype":"void","slug":"controller.usesLayout","parameters":[{"required":true,"hint":"Name of the layout template or function name you want to use.","name":"template","type":"string"},{"default":"","required":false,"hint":"Name of the layout template you want to use for AJAX requests.","name":"ajax","type":"string"},{"required":false,"hint":"List of actions that should not get the layout.","name":"except","type":"string"},{"required":false,"hint":"List of actions that should only get the layout.","name":"only","type":"string"},{"default":true,"required":false,"hint":"When specifying conditions or a function, pass in `true` to use the default `layout.cfm` if none of the conditions are met.","name":"useDefault","type":"boolean"}],"availableIn":["controller"],"name":"usesLayout","tags":{"categoryClass":"configurationfunctions","sectionClass":"controller","category":"Configuration Functions","section":"Controller"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Check if a user is valid before proceeding with execution\nuser = model(&quot;user&quot;).new(params.user);\n\nif user.valid(){\n    // Do something here\n}</code></pre>"},"hint":"Runs the validation on the object and returns <code>true</code> if it passes it.\r\nCFWheels will run the validation process automatically whenever an object is saved to the database, but sometimes it's useful to be able to run this method to see if the object is valid without saving it to the database.\r\n\r\n","returntype":"boolean","slug":"model.valid","parameters":[{"default":"true","required":false,"hint":"Set to `false` to disable callbacks for this method.","name":"callbacks","type":"boolean"},{"default":false,"required":false,"name":"validateAssociations","type":"boolean"}],"availableIn":["model"],"name":"valid","tags":{"categoryClass":"errorfunctions","sectionClass":"modelobject","category":"Error Functions","section":"Model Object"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>function config() {\n\t// Register the `checkPhoneNumber` method below to be called to validate objects before they are saved.\n\tvalidate(&quot;checkPhoneNumber&quot;);\n}\n\nfunction checkPhoneNumber() {\n\t// Make sure area code is `614`.\n\treturn Left(this.phoneNumber, 3) == &quot;614&quot;;\n}</code></pre>"},"hint":"Registers method(s) that should be called to validate objects before they are saved.\r\n\r\n","returntype":"void","slug":"model.validate","parameters":[{"default":"","required":false,"hint":"Method name or list of method names to call. Can also be called with the `method` argument.","name":"methods","type":"string"},{"default":"","required":false,"hint":"String expression to be evaluated that decides if validation will be run (if the expression returns `true` validation will run).","name":"condition","type":"string"},{"default":"","required":false,"hint":"String expression to be evaluated that decides if validation will be run (if the expression returns `false` validation will run).","name":"unless","type":"string"},{"default":"onSave","required":false,"hint":"Pass in `onCreate` or `onUpdate` to limit when this validation occurs (by default validation will occur on both create and update, i.e. `onSave`).","name":"when","type":"string"}],"availableIn":["model"],"name":"validate","tags":{"categoryClass":"validationfunctions","sectionClass":"modelconfiguration","category":"Validation Functions","section":"Model Configuration"}},{"extended":{"hasExtended":false,"docs":""},"hint":"","returntype":"any","slug":"controller.validateMonitor","parameters":[{"required":false,"name":"monitoruserid","type":"string"},{"required":false,"name":"monitorlname","type":"string"},{"required":false,"name":"userid","type":"numeric"}],"availableIn":["controller"],"name":"validateMonitor","tags":{"categoryClass":"","sectionClass":"","category":"","section":""}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>function config(){\n\t// Register the `checkPhoneNumber` method below to be called to validate new objects before they are inserted.\n\tvalidateOnCreate(&quot;checkPhoneNumber&quot;);\n}\n\nfunction checkPhoneNumber(){\n\t// Make sure area code is `614`.\n\treturn Left(this.phoneNumber, 3) == &quot;614&quot;;\n}</code></pre>"},"hint":"Registers method(s) that should be called to validate new objects before they are inserted.\r\n\r\n","returntype":"void","slug":"model.validateOnCreate","parameters":[{"default":"","required":false,"hint":"Method name or list of method names to call. Can also be called with the `method` argument.","name":"methods","type":"string"},{"default":"","required":false,"hint":"String expression to be evaluated that decides if validation will be run (if the expression returns `true` validation will run).","name":"condition","type":"string"},{"default":"","required":false,"hint":"String expression to be evaluated that decides if validation will be run (if the expression returns `false` validation will run).","name":"unless","type":"string"}],"availableIn":["model"],"name":"validateOnCreate","tags":{"categoryClass":"validationfunctions","sectionClass":"modelconfiguration","category":"Validation Functions","section":"Model Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>function config(){\n\t// Register the `check` method below to be called to validate existing objects before they are updated.\n\tvalidateOnUpdate(&quot;checkPhoneNumber&quot;);\n}\n\nfunction checkPhoneNumber(){\n\t// Make sure area code is `614`\n\treturn Left(this.phoneNumber, 3) == &quot;614&quot;;\n}</code></pre>"},"hint":"Registers method(s) that should be called to validate existing objects before they are updated.\r\n\r\n","returntype":"void","slug":"model.validateOnUpdate","parameters":[{"default":"","required":false,"hint":"Method name or list of method names to call. Can also be called with the `method` argument.","name":"methods","type":"string"},{"default":"","required":false,"hint":"String expression to be evaluated that decides if validation will be run (if the expression returns `true` validation will run).","name":"condition","type":"string"},{"default":"","required":false,"hint":"String expression to be evaluated that decides if validation will be run (if the expression returns `false` validation will run).","name":"unless","type":"string"}],"availableIn":["model"],"name":"validateOnUpdate","tags":{"categoryClass":"validationfunctions","sectionClass":"modelconfiguration","category":"Validation Functions","section":"Model Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Make sure that the user has to confirm their password correctly the first time they register (usually done by typing it again in a second form field)\nvalidatesConfirmationOf(property=&quot;password&quot;, when=&quot;onCreate&quot;, message=&quot;Your password and its confirmation do not match. Please try again.&quot;);</code></pre>"},"hint":"Validates that the value of the specified property also has an identical confirmation value.\r\nThis is common when having a user type in their email address a second time to confirm, confirming a password by typing it a second time, etc.\r\nThe confirmation value only exists temporarily and never gets saved to the database.\r\nBy convention, the confirmation property has to be named the same as the property with \"Confirmation\" appended at the end.\r\nUsing the password example, to confirm our password property, we would create a property called <code>passwordConfirmation</code>.\r\n\r\n","returntype":"void","slug":"model.validatesConfirmationOf","parameters":[{"default":"","required":false,"hint":"Name of property or list of property names to validate against (can also be called with the `property` argument).","name":"properties","type":"string"},{"default":"[property] should match confirmation","required":false,"hint":"Supply a custom error message here to override the built-in one.","name":"message","type":"string"},{"default":"onSave","required":false,"hint":"Pass in `onCreate` or `onUpdate` to limit when this validation occurs (by default validation will occur on both create and update, i.e. `onSave`).","name":"when","type":"string"},{"default":"","required":false,"hint":"String expression to be evaluated that decides if validation will be run (if the expression returns `true` validation will run).","name":"condition","type":"string"},{"default":"","required":false,"hint":"String expression to be evaluated that decides if validation will be run (if the expression returns `false` validation will run).","name":"unless","type":"string"},{"default":false,"required":false,"hint":"Ensure the confirmed property comparison is case sensitive","name":"caseSensitive","type":"boolean"}],"availableIn":["model"],"name":"validatesConfirmationOf","tags":{"categoryClass":"validationfunctions","sectionClass":"modelconfiguration","category":"Validation Functions","section":"Model Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Do not allow &quot;PHP&quot; or &quot;Fortran&quot; to be saved to the database as a cool language\nvalidatesExclusionOf(property=&quot;coolLanguage&quot;, list=&quot;php,fortran&quot;, message=&quot;Haha, you can not be serious. Try again, please.&quot;);</code></pre>"},"hint":"Validates that the value of the specified property does not exist in the supplied list.\r\n\r\n","returntype":"void","slug":"model.validatesExclusionOf","parameters":[{"default":"","required":false,"hint":"Name of property or list of property names to validate against (can also be called with the `property` argument).","name":"properties","type":"string"},{"required":true,"hint":"Single value or list of values that should not be allowed.","name":"list","type":"string"},{"default":"[property] is reserved","required":false,"hint":"Supply a custom error message here to override the built-in one.","name":"message","type":"string"},{"default":"onSave","required":false,"hint":"Pass in `onCreate` or `onUpdate` to limit when this validation occurs (by default validation will occur on both create and update, i.e. `onSave`).","name":"when","type":"string"},{"default":false,"required":false,"hint":"If set to `true`, validation will be skipped if the property value is an empty string or doesn't exist at all. This is useful if you only want to run this validation after it passes the `validatesPresenceOf` test, thus avoiding duplicate error messages if it doesn't.","name":"allowBlank","type":"boolean"},{"default":"","required":false,"hint":"String expression to be evaluated that decides if validation will be run (if the expression returns `true` validation will run).","name":"condition","type":"string"},{"default":"","required":false,"hint":"String expression to be evaluated that decides if validation will be run (if the expression returns `false` validation will run).","name":"unless","type":"string"}],"availableIn":["model"],"name":"validatesExclusionOf","tags":{"categoryClass":"validationfunctions","sectionClass":"modelconfiguration","category":"Validation Functions","section":"Model Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Make sure that the user has entered a correct credit card validatesFormatOf(property=&quot;cc&quot;, type=&quot;creditcard&quot;); /*  * Make sure that the user has entered an email address ending with the  * `.se` domain when the `ipCheck()` method returns `true`, and it's not  * Sunday. Also supply a custom error message that overrides the CFWheels  * default one  */ validatesFormatOf( property=&quot;email&quot;, regEx=&quot;^.*@.*\\.se$&quot;, condition=&quot;ipCheck()&quot;, unless=&quot;DayOfWeek() eq 1&quot; message=&quot;Sorry, you must have a Swedish email address to use this website.&quot; );</code></pre>"},"hint":"Validates that the value of the specified property is formatted correctly by matching it against a regular expression using the regEx argument and / or against a built-in CFML validation type using the type argument (creditcard, date, email, etc.).\r\n\r\n","returntype":"void","slug":"model.validatesFormatOf","parameters":[{"default":"","required":false,"hint":"Name of property or list of property names to validate against (can also be called with the `property` argument).","name":"properties","type":"string"},{"default":"","required":false,"hint":"Regular expression to verify against.","name":"regEx","type":"string"},{"default":"","required":false,"hint":"One of the following types to verify against: creditcard, date, email, eurodate, guid, social_security_number, ssn, telephone, time, URL, USdate, UUID, variableName, zipcode (will be passed through to your CFML engine's IsValid() function).","name":"type","type":"string"},{"default":"[property] is invalid","required":false,"hint":"Supply a custom error message here to override the built-in one.","name":"message","type":"string"},{"default":"onSave","required":false,"hint":"Pass in `onCreate` or `onUpdate` to limit when this validation occurs (by default validation will occur on both create and update, i.e. `onSave`).","name":"when","type":"string"},{"default":false,"required":false,"hint":"If set to `true`, validation will be skipped if the property value is an empty string or doesn't exist at all. This is useful if you only want to run this validation after it passes the `validatesPresenceOf` test, thus avoiding duplicate error messages if it doesn't.","name":"allowBlank","type":"boolean"},{"default":"","required":false,"hint":"String expression to be evaluated that decides if validation will be run (if the expression returns `true` validation will run).","name":"condition","type":"string"},{"default":"","required":false,"hint":"String expression to be evaluated that decides if validation will be run (if the expression returns `false` validation will run).","name":"unless","type":"string"}],"availableIn":["model"],"name":"validatesFormatOf","tags":{"categoryClass":"validationfunctions","sectionClass":"modelconfiguration","category":"Validation Functions","section":"Model Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Make sure that the user selects either &quot;CFWheels&quot; or &quot;Rails&quot; as their framework \nvalidatesInclusionOf(property=&quot;frameworkOfChoice&quot;, list=&quot;cfwheels,rails&quot;, message=&quot;Please try again, and this time, select a decent framework!&quot; );</code></pre>"},"hint":"Validates that the value of the specified property exists in the supplied list.\r\n\r\n","returntype":"void","slug":"model.validatesInclusionOf","parameters":[{"default":"","required":false,"hint":"Name of property or list of property names to validate against (can also be called with the `property` argument).","name":"properties","type":"string"},{"required":true,"hint":"List of allowed values.","name":"list","type":"string"},{"default":"[property] is not included in the list","required":false,"hint":"Supply a custom error message here to override the built-in one.","name":"message","type":"string"},{"default":"onSave","required":false,"hint":"Pass in `onCreate` or `onUpdate` to limit when this validation occurs (by default validation will occur on both create and update, i.e. `onSave`).","name":"when","type":"string"},{"default":false,"required":false,"hint":"If set to `true`, validation will be skipped if the property value is an empty string or doesn't exist at all. This is useful if you only want to run this validation after it passes the `validatesPresenceOf` test, thus avoiding duplicate error messages if it doesn't.","name":"allowBlank","type":"boolean"},{"default":"","required":false,"hint":"String expression to be evaluated that decides if validation will be run (if the expression returns `true` validation will run).","name":"condition","type":"string"},{"default":"","required":false,"hint":"String expression to be evaluated that decides if validation will be run (if the expression returns `false` validation will run).","name":"unless","type":"string"}],"availableIn":["model"],"name":"validatesInclusionOf","tags":{"categoryClass":"validationfunctions","sectionClass":"modelconfiguration","category":"Validation Functions","section":"Model Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Make sure that the `firstname` and `lastName` properties are not more than\n// 50 characters and use square brackets to dynamically insert the property\n// name when the error message is displayed to the user. (The `firstName`\n// property will be displayed as &quot;first name&quot;.)\nvalidatesLengthOf(\n    properties=&quot;firstName,lastName&quot;,\n    maximum=50,\n    message=&quot;Please shorten your [property] please (50 characters max).&quot;\n);\n\n// Make sure that the `password` property is between 4 and 15 characters\nvalidatesLengthOf(\n    property=&quot;password&quot;,\n    within=&quot;4,20&quot;,\n    message=&quot;The password length must be between 4 and 20 characters.&quot;\n);</code></pre>"},"hint":"Validates that the value of the specified property matches the length requirements supplied.\r\nUse the <code>exactly</code>, <code>maximum</code>, <code>minimum</code> and <code>within</code> arguments to specify the length requirements.\r\n\r\n","returntype":"void","slug":"model.validatesLengthOf","parameters":[{"default":"","required":false,"hint":"Name of property or list of property names to validate against (can also be called with the `property` argument).","name":"properties","type":"string"},{"default":"[property] is the wrong length","required":false,"hint":"Supply a custom error message here to override the built-in one.","name":"message","type":"string"},{"default":"onSave","required":false,"hint":"Pass in `onCreate` or `onUpdate` to limit when this validation occurs (by default validation will occur on both create and update, i.e. `onSave`).","name":"when","type":"string"},{"default":false,"required":false,"hint":"If set to `true`, validation will be skipped if the property value is an empty string or doesn't exist at all. This is useful if you only want to run this validation after it passes the `validatesPresenceOf` test, thus avoiding duplicate error messages if it doesn't.","name":"allowBlank","type":"boolean"},{"default":0,"required":false,"hint":"The exact length that the property value must be.","name":"exactly","type":"numeric"},{"default":0,"required":false,"hint":"The maximum length that the property value can be.","name":"maximum","type":"numeric"},{"default":0,"required":false,"hint":"The minimum length that the property value can be.","name":"minimum","type":"numeric"},{"default":"","required":false,"hint":"A list of two values (minimum and maximum) that the length of the property value must fall within.","name":"within","type":"string"},{"default":"","required":false,"hint":"String expression to be evaluated that decides if validation will be run (if the expression returns `true` validation will run).","name":"condition","type":"string"},{"default":"","required":false,"hint":"String expression to be evaluated that decides if validation will be run (if the expression returns `false` validation will run).","name":"unless","type":"string"}],"availableIn":["model"],"name":"validatesLengthOf","tags":{"categoryClass":"validationfunctions","sectionClass":"modelconfiguration","category":"Validation Functions","section":"Model Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Make sure that the score is a number with no decimals but only when a score is supplied. (Tetting `allowBlank` to `true` means that objects are allowed to be saved without scores, typically resulting in `NULL` values being inserted in the database table)\nvalidatesNumericalityOf(property=&quot;score&quot;, onlyInteger=true, allowBlank=true, message=&quot;Please enter a correct score.&quot;);</code></pre>"},"hint":"Validates that the value of the specified property is numeric.\r\n\r\n","returntype":"void","slug":"model.validatesNumericalityOf","parameters":[{"default":"","required":false,"hint":"Name of property or list of property names to validate against (can also be called with the `property` argument).","name":"properties","type":"string"},{"default":"[property] is not a number","required":false,"hint":"Supply a custom error message here to override the built-in one.","name":"message","type":"string"},{"default":"onSave","required":false,"hint":"Pass in `onCreate` or `onUpdate` to limit when this validation occurs (by default validation will occur on both create and update, i.e. `onSave`).","name":"when","type":"string"},{"default":false,"required":false,"hint":"If set to `true`, validation will be skipped if the property value is an empty string or doesn't exist at all. This is useful if you only want to run this validation after it passes the `validatesPresenceOf` test, thus avoiding duplicate error messages if it doesn't.","name":"allowBlank","type":"boolean"},{"default":false,"required":false,"hint":"Specifies whether the property value must be an integer.","name":"onlyInteger","type":"boolean"},{"default":"","required":false,"hint":"String expression to be evaluated that decides if validation will be run (if the expression returns `true` validation will run).","name":"condition","type":"string"},{"default":"","required":false,"hint":"String expression to be evaluated that decides if validation will be run (if the expression returns `false` validation will run).","name":"unless","type":"string"},{"default":"","required":false,"name":"odd","type":"boolean"},{"default":"","required":false,"name":"even","type":"boolean"},{"default":"","required":false,"hint":"Specifies whether or not the value must be greater than the supplied value.","name":"greaterThan","type":"numeric"},{"default":"","required":false,"hint":"Specifies whether or not the value must be greater than or equal the supplied value.","name":"greaterThanOrEqualTo","type":"numeric"},{"default":"","required":false,"hint":"Specifies whether or not the value must be equal to the supplied value.","name":"equalTo","type":"numeric"},{"default":"","required":false,"hint":"Specifies whether or not the value must be less than the supplied value.","name":"lessThan","type":"numeric"},{"default":"","required":false,"hint":"Specifies whether or not the value must be less than or equal the supplied value.","name":"lessThanOrEqualTo","type":"numeric"}],"availableIn":["model"],"name":"validatesNumericalityOf","tags":{"categoryClass":"validationfunctions","sectionClass":"modelconfiguration","category":"Validation Functions","section":"Model Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Make sure that the user data can not be saved to the database without the `emailAddress` property. (It must exist and not be an empty string)\nvalidatesPresenceOf(&quot;emailAddress&quot;);</code></pre>"},"hint":"Validates that the specified property exists and that its value is not blank.\r\n\r\n","returntype":"void","slug":"model.validatesPresenceOf","parameters":[{"default":"","required":false,"hint":"Name of property or list of property names to validate against (can also be called with the `property` argument).","name":"properties","type":"string"},{"default":"[property] can't be empty","required":false,"hint":"Supply a custom error message here to override the built-in one.","name":"message","type":"string"},{"default":"onSave","required":false,"hint":"Pass in `onCreate` or `onUpdate` to limit when this validation occurs (by default validation will occur on both create and update, i.e. `onSave`).","name":"when","type":"string"},{"default":"","required":false,"hint":"String expression to be evaluated that decides if validation will be run (if the expression returns `true` validation will run).","name":"condition","type":"string"},{"default":"","required":false,"hint":"String expression to be evaluated that decides if validation will be run (if the expression returns `false` validation will run).","name":"unless","type":"string"}],"availableIn":["model"],"name":"validatesPresenceOf","tags":{"categoryClass":"validationfunctions","sectionClass":"modelconfiguration","category":"Validation Functions","section":"Model Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Make sure that two users with the same username won't ever exist in the database table\nvalidatesUniquenessOf(property=&quot;username&quot;, message=&quot;Sorry, that username is already taken.&quot;);\n\n// Same as above but allow identical usernames as long as they belong to a different account\nvalidatesUniquenessOf(property=&quot;username&quot;, scope=&quot;accountId&quot;);\n\n</code></pre>"},"hint":"Validates that the value of the specified property is unique in the database table.\r\nUseful for ensuring that two users can't sign up to a website with identical usernames for example.\r\nWhen a new record is created, a check is made to make sure that no record already exists in the database table with the given value for the specified property.\r\nWhen the record is updated, the same check is made but disregarding the record itself.\r\n\r\n","returntype":"void","slug":"model.validatesUniquenessOf","parameters":[{"default":"","required":false,"hint":"Name of property or list of property names to validate against (can also be called with the `property` argument).","name":"properties","type":"string"},{"default":"[property] has already been taken","required":false,"hint":"Supply a custom error message here to override the built-in one.","name":"message","type":"string"},{"default":"onSave","required":false,"hint":"Pass in `onCreate` or `onUpdate` to limit when this validation occurs (by default validation will occur on both create and update, i.e. `onSave`).","name":"when","type":"string"},{"default":false,"required":false,"hint":"If set to `true`, validation will be skipped if the property value is an empty string or doesn't exist at all. This is useful if you only want to run this validation after it passes the `validatesPresenceOf` test, thus avoiding duplicate error messages if it doesn't.","name":"allowBlank","type":"boolean"},{"default":"","required":false,"hint":"One or more properties by which to limit the scope of the uniqueness constraint.","name":"scope","type":"string"},{"default":"","required":false,"hint":"String expression to be evaluated that decides if validation will be run (if the expression returns `true` validation will run).","name":"condition","type":"string"},{"default":"","required":false,"hint":"String expression to be evaluated that decides if validation will be run (if the expression returns `false` validation will run).","name":"unless","type":"string"},{"default":"true","required":false,"hint":"Set to `true` to include soft-deleted records in the queries that this method runs.","name":"includeSoftDeletes","type":"boolean"}],"availableIn":["model"],"name":"validatesUniquenessOf","tags":{"categoryClass":"validationfunctions","sectionClass":"modelconfiguration","category":"Validation Functions","section":"Model Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// first name is a varchar(50) column\nemployee = model(&quot;employee&quot;).new();\n\n&lt;!--- would output &quot;string&quot;---&gt;\n#employee.validationTypeForProperty(&quot;firstName&quot;)#\n</code></pre>"},"hint":"Returns the validation type for the property.\r\n\r\n","returntype":"any","slug":"model.validationTypeForProperty","parameters":[{"required":true,"hint":"Name of column to retrieve data for.","name":"property","type":"string"}],"availableIn":["model"],"name":"validationTypeForProperty","tags":{"categoryClass":"miscellaneousfunctions","sectionClass":"modelclass","category":"Miscellaneous Functions","section":"Model Class"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Get verification chain, remove the first item, and set it back.\nmyVerificationChain = verificationChain();\nArrayDeleteAt(myVerificationChain, 1);\nsetVerificationChain(myVerificationChain);\n</code></pre>"},"hint":"Returns an array of all the verifications set on this controller in the order in which they will be executed.\r\n\r\n","returntype":"array","slug":"controller.verificationChain","parameters":[],"availableIn":["controller"],"name":"verificationChain","tags":{"categoryClass":"configurationfunctions","sectionClass":"controller","category":"Configuration Functions","section":"Controller"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>// Tell CFWheels to verify that the `handleForm` action is always a `POST` request when executed.\nverifies(only=&quot;handleForm&quot;, post=true);\n\n// Make sure that the edit action is a `GET` request, that `userId` exists in the `params` struct, and that it's an integer.\nverifies(only=&quot;edit&quot;, get=true, params=&quot;userId&quot;, paramsTypes=&quot;integer&quot;);\n\n// Just like above, only this time we want to invoke a custom function in our controller to handle the request when it is invalid.\nverifies(only=&quot;edit&quot;, get=true, params=&quot;userId&quot;, paramsTypes=&quot;integer&quot;, handler=&quot;myCustomFunction&quot;);\n\n// Just like above, only this time instead of specifying a handler, we want to `redirect` the visitor to the index action of the controller and show an error in The Flash when the request is invalid.\nverifies(only=&quot;edit&quot;, get=true, params=&quot;userId&quot;, paramsTypes=&quot;integer&quot;, action=&quot;index&quot;, error=&quot;Invalid userId&quot;);\n</code></pre>"},"hint":"Instructs CFWheels to verify that some specific criterias are met before running an action.\r\nNote that all undeclared arguments will be passed to <code>redirectTo()</code> call if a <code>handler</code> is not specified.\r\n\r\n","returntype":"void","slug":"controller.verifies","parameters":[{"default":"","required":false,"hint":"List of action names to limit this verification to.","name":"only","type":"string"},{"default":"","required":false,"hint":"List of action names to exclude this verification from.","name":"except","type":"string"},{"default":"","required":false,"hint":"Set to true to verify that this is a `POST` request.","name":"post","type":"any"},{"default":"","required":false,"hint":"Set to true to verify that this is a `GET` request.","name":"get","type":"any"},{"default":"","required":false,"hint":"Set to true to verify that this is an `AJAX` request.","name":"ajax","type":"any"},{"default":"","required":false,"hint":"Verify that the passed in variable name exists in the cookie scope.","name":"cookie","type":"string"},{"default":"","required":false,"hint":"Verify that the passed in variable name exists in the session scope.","name":"session","type":"string"},{"default":"","required":false,"hint":"Verify that the passed in variable name exists in the params struct.","name":"params","type":"string"},{"default":"","required":false,"hint":"Pass in the name of a function that should handle failed verifications. The default is to just abort the request when a verification fails.","name":"handler","type":"string"},{"default":"","required":false,"hint":"List of types to check each listed cookie value against (will be passed through to your CFML engine's `IsValid` function).","name":"cookieTypes","type":"string"},{"default":"","required":false,"hint":"List of types to check each list session value against (will be passed through to your CFML engine's `IsValid` function).","name":"sessionTypes","type":"string"},{"default":"","required":false,"hint":"List of types to check each params value against (will be passed through to your CFML engine's `IsValid` function).","name":"paramsTypes","type":"string"}],"availableIn":["controller"],"name":"verifies","tags":{"categoryClass":"configurationfunctions","sectionClass":"controller","category":"Configuration Functions","section":"Controller"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;cfscript&gt;\n\nmapper()\n    // Enables `[controller]` and `[controller]/[action]`, only via `GET` requests.\n    .wildcard()\n\n    // Enables `[controller]/[action]/[key]` as well.\n    .wildcard(mapKey=true)\n\n    // Also enables patterns like `[controller].[format]` and\n    // `[controller]/[action].[format]`\n    .wildcard(mapFormat=true)\n\n    // Allow additional methods beyond just `GET`\n    //\n    // Note that this can open some serious security holes unless you use `verifies`\n    // in the controller to make sure that requests changing data can only occur\n    // with a `POST` method.\n    .wildcard(methods=&quot;get,post&quot;)\n.end();\n\n&lt;/cfscript&gt;</code></pre>"},"hint":"Special wildcard matching generates routes with `\r\n","returntype":"struct","slug":"mapper.wildcard","parameters":[{"default":"get","required":false,"hint":"List of HTTP methods (verbs) to generate the wildcard routes for. We strongly recommend leaving the default value of `get` and using other routing mappers if you need to `POST` to a URL endpoint. For better readability, you can also pass this argument as `methods` if you're listing multiple methods.","name":"method","type":"string"},{"default":"index","required":false,"hint":"Default action to specify if the value for the `[action]` placeholder is not provided.","name":"action","type":"string"},{"default":false,"required":false,"hint":"Whether or not to enable a `[key]` matcher, enabling a `[controller]/[action]/[key]` pattern.","name":"mapKey","type":"boolean"},{"default":false,"required":false,"hint":"Whether or not to add an optional `.[format]` pattern to the end of the generated routes. This is useful for providing formats via URL like `json`, `xml`, `pdf`, etc.","name":"mapFormat","type":"boolean"}],"availableIn":["mapper"],"name":"wildcard","tags":{"categoryClass":"routing","sectionClass":"configuration","category":"Routing","section":"Configuration"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;!--- Outputs &quot;CFWheels is a framework...&quot; ---&gt;\n#wordTruncate(text=&quot;CFWheels is a framework for ColdFusion&quot;, length=4)#</code></pre>"},"hint":"Truncates text to the specified length of words and replaces the remaining characters with the specified truncate string (which defaults to \"...\").\r\n\r\n","returntype":"string","slug":"controller.wordTruncate","parameters":[{"required":true,"hint":"The text to truncate.","name":"text","type":"string"},{"default":5,"required":false,"hint":"Number of words to truncate the text to.","name":"length","type":"numeric"},{"default":"...","required":false,"hint":"String to replace the last characters with.","name":"truncateString","type":"string"}],"availableIn":["controller","model","test","migrator","migration","tabledefinition"],"name":"wordTruncate","tags":{"categoryClass":"stringfunctions","sectionClass":"globalhelpers","category":"String Functions","section":"Global Helpers"}},{"extended":{"hasExtended":true,"docs":"<pre><code class='javascript'>&lt;!--- View Code ---&gt;\n#yearSelectTag(name=&quot;yearOfBirthday&quot;, selected=params.yearOfBirthday)#\n\n// Only allow selection of year to be for the past 50 years, minimum being 18 years ago\nfiftyYearsAgo = Now() - 50;\neighteenYearsAgo = Now() - 18;\n\n&lt;!--- View Code ---&gt;\n#yearSelectTag(name=&quot;yearOfBirthday&quot;, selected=params.yearOfBirthday, startYear=fiftyYearsAgo, endYear=eighteenYearsAgo)#</code></pre>"},"hint":"Builds and returns a string containing a <code>select</code> form control for a range of years based on the supplied name.\r\n\r\n","returntype":"string","slug":"controller.yearSelectTag","parameters":[{"required":true,"hint":"Name to populate in tag's name attribute.","name":"name","type":"string"},{"default":"","required":false,"hint":"The year that should be selected initially.","name":"selected","type":"string"},{"default":2021,"required":false,"hint":"First year in `select` list.","name":"startYear","type":"numeric"},{"default":2031,"required":false,"hint":"Last year in `select` list.","name":"endYear","type":"numeric"},{"default":false,"required":false,"hint":"Whether to include a blank option in the select form control. Pass true to include a blank line or a string that should represent what display text should appear for the empty value (for example, \"- Select One -\").","name":"includeBlank","type":"any"},{"default":"","required":false,"hint":"The label text to use in the form control.","name":"label","type":"string"},{"default":"around","required":false,"hint":"Whether to place the label before, after, or wrapped around the form control. Label text placement can be controlled using aroundLeft or aroundRight.","name":"labelPlacement","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control. Useful to wrap the form control with HTML tags.","name":"prepend","type":"string"},{"default":"","required":false,"hint":"String to append to the form control. Useful to wrap the form control with HTML tags.","name":"append","type":"string"},{"default":"","required":false,"hint":"String to prepend to the form control's label. Useful to wrap the form control with HTML tags.","name":"prependToLabel","type":"string"},{"default":"","required":false,"hint":"String to append to the form control's label. Useful to wrap the form control with HTML tags.","name":"appendToLabel","type":"string"},{"default":true,"required":false,"hint":"Use this argument to decide whether the output of the function should be encoded in order to prevent Cross Site Scripting (XSS) attacks. Set it to `true` to encode all relevant output for the specific HTML element in question (e.g. tag content, attribute values, and URLs). For HTML elements that have both tag content and attribute values you can set this argument to `attributes` to only encode attribute values and not tag content.","name":"encode","type":"any"},{"default":"[runtime expression]","required":false,"name":"$now","type":"date"}],"availableIn":["controller"],"name":"yearSelectTag","tags":{"categoryClass":"formtagfunctions","sectionClass":"viewhelpers","category":"Form Tag Functions","section":"View Helpers"}}]}


