Skip to content

Controller

processAction()

processAction() — returns boolean

Available in: controller Category: Miscellaneous Functions

Process the specified action of the controller. This is exposed in the API primarily for testing purposes; you would not usually call it directly unless in the test suite.

NameTypeRequiredDefaultDescription
includeFiltersstringnotrueSet 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.
// 1. Process the current action (runs before and after filters plus the action itself).
// Typically called automatically by the framework; used directly in unit tests.
result = controller.processAction();
// result -> true

// 2. Process the action running only "before" filters (skip "after" filters).
result = controller.processAction(includeFilters="before");
// result -> true

// 3. Process the action without running any filters.
result = controller.processAction(includeFilters=false);
// result -> true