Skip to content

Controller

Controller

  • authenticityToken() — Returns the raw CSRF authenticity token
  • caches() — Tells CFWheels to cache one or more actions.
  • filterChain() — Returns an array of all the filters set on current controller in the order in which they will be executed.
  • filters() — Tells CFWheels to run a function before an action is run or after an action has been run.
  • flash() — Returns the value of a specific key in the Flash (or the entire Flash as a struct if no key is passed in).
  • flashClear() — Deletes everything from the Flash.
  • flashCount() — Returns how many keys exist in the Flash.
  • flashDelete() — Deletes a specific key from the Flash.
  • flashInsert() — Inserts a new key / value into the Flash.
  • flashIsEmpty() — Returns whether or not the Flash is empty.
  • flashKeep() — Make the entire Flash or specific key in it stick around for one more request.
  • flashKeyExists() — Checks if a specific key exists in the Flash.
  • getEmails() — Primarily used for testing to get information about emails sent during the request.
  • getFiles() — Primarily used for testing to get information about files sent during the request.
  • getRedirect() — Primarily used for testing to establish whether the current request has performed a redirect.
  • isAjax() — Returns whether the page was called from JavaScript or not.
  • isDelete() — Returns whether the request was a DELETE request or not.
  • isGet() — Returns whether the request was a normal GET request or not.
  • isHead() — Returns whether the request was a HEAD request or not.
  • isOptions() — Returns whether the request was an OPTIONS request or not.
  • isPatch() — Returns whether the request was a PATCH request or not.
  • isPost() — Returns whether the request came from a form POST submission or not.
  • isPut() — Returns whether the request was a PUT request or not.
  • isSecure() — Returns whether CFWheels is communicating over a secure port.
  • onlyProvides() — Use this in an individual controller action to define which formats the action will respond with.
  • pagination() — Returns a struct with information about the specificed paginated query.
  • processAction() — Process the specified action of the controller.
  • processRequest() — Creates a controller and calls an action on it.
  • protectsFromForgery() — Tells CFWheels to protect POSTed requests from CSRF vulnerabilities.
  • provides() — Defines formats that the controller will respond with upon request.
  • redirectTo() — Redirects the browser to the supplied controller/action/key, route or back to the referring page.
  • renderNothing() — Instructs the controller to render an empty string when it’s finished processing the action.
  • renderPartial() — Instructs the controller to render a partial when it’s finished processing the action.
  • renderText() — Instructs the controller to render specified text when it’s finished processing the action.
  • renderView() — Instructs the controller which view template and layout to render when it’s finished processing the action.
  • renderWith() — Instructs the controller to render the data passed in to the format that is requested.
  • response() — Returns content that CFWheels will send to the client in response to the request.
  • sendEmail() — Sends an email using a template and an optional layout to wrap it in.
  • sendFile() — Sends a file to the user (from the files folder or a path relative to it by default).
  • setFilterChain() — Use this function if you need a more low level way of setting the entire filter chain for a controller.
  • setPagination() — Allows you to set a pagination handle for a custom query so you can perform pagination on it in your view with pag
  • setResponse() — Sets content that CFWheels will send to the client in response to the request.
  • setVerificationChain() — Use this function if you need a more low level way of setting the entire verification chain for a controller.
  • usesLayout() — Used within a controller’s config() function to specify controller- or action-specific layouts.
  • verificationChain() — Returns an array of all the verifications set on this controller in the order in which they will be executed.
  • verifies() — Instructs CFWheels to verify that some specific criterias are met before running an action.