Heratio Framework API Reference

sfActions extends sfAction
in package

Table of Contents

Methods

__get()  : mixed
__isset()  : mixed
__set()  : mixed
__unset()  : mixed
execute()  : string
Dispatch to the appropriate execute method.
forward()  : mixed
Forward to another action.
forward404()  : mixed
Forward to a 404 error page.
forward404If()  : mixed
Forward to 404 if condition is true.
forward404Unless()  : mixed
Forward to 404 unless condition is true.
generateUrl()  : string
Generate a URL.
getActionName()  : string
getContext()  : sfContext
getController()  : sfController
getCredential()  : mixed
Get the credential required for this action.
getDefaultView()  : string
Get default view — returned when execute returns sfView::INPUT.
getLayout()  : string|false|null
Get the layout.
getModuleName()  : string
getPartial()  : string
Get a partial template as a string.
getRequest()  : sfWebRequest
getRequestParameter()  : mixed
getResponse()  : sfWebResponse
getRoute()  : sfRoute|null
Get the matched route object.
getSecurityConfiguration()  : array<string|int, mixed>
Get the full security configuration.
getTemplate()  : string|null
Get the template for this action.
getUser()  : sfUser
getVar()  : mixed
getVarHolder()  : sfParameterHolder
handleError()  : string
Handle validation error — called when validate() returns false.
hasRequestParameter()  : bool
hasVar()  : bool
Check if a template variable exists.
initialize()  : mixed
Initialize the component.
isSecure()  : bool
Check if the action is secure.
logMessage()  : mixed
Log a message via event dispatcher.
postExecute()  : mixed
preExecute()  : mixed
redirect()  : mixed
Redirect to a URL.
redirectToRoute()  : mixed
Redirect to a route.
renderPartial()  : mixed
Include a partial template.
renderText()  : string
Render inline text (returns sfView::NONE).
setLayout()  : mixed
Set the layout.
setSecurityConfiguration()  : mixed
Set the security configuration.
setTemplate()  : mixed
Set the template for this action.
setVar()  : mixed
setViewClass()  : mixed
Set the view class for this action.
validate()  : bool
Validate the request — returns true by default.

Methods

__get()

public & __get(mixed $name) : mixed
Parameters
$name : mixed

__isset()

public __isset(mixed $name) : mixed
Parameters
$name : mixed

__set()

public __set(mixed $name, mixed $value) : mixed
Parameters
$name : mixed
$value : mixed

__unset()

public __unset(mixed $name) : mixed
Parameters
$name : mixed

forward()

Forward to another action.

public forward(string $module, string $action) : mixed
Parameters
$module : string
$action : string
Tags
throws
sfStopException

Always thrown to stop execution

forward404()

Forward to a 404 error page.

public forward404([string $message = null ]) : mixed
Parameters
$message : string = null
Tags
throws
sfError404Exception

forward404If()

Forward to 404 if condition is true.

public forward404If(bool $condition[, string $message = null ]) : mixed
Parameters
$condition : bool
$message : string = null

forward404Unless()

Forward to 404 unless condition is true.

public forward404Unless(bool $condition[, string $message = null ]) : mixed
Parameters
$condition : bool
$message : string = null

generateUrl()

Generate a URL.

public generateUrl(string $route[, array<string|int, mixed> $params = [] ][, bool $absolute = false ]) : string
Parameters
$route : string

Route name or module/action

$params : array<string|int, mixed> = []

Parameters

$absolute : bool = false

Generate absolute URL

Return values
string

getActionName()

public getActionName() : string
Return values
string

getController()

public getController() : sfController
Return values
sfController

getCredential()

Get the credential required for this action.

public getCredential() : mixed

getDefaultView()

Get default view — returned when execute returns sfView::INPUT.

public getDefaultView() : string
Return values
string

getLayout()

Get the layout.

public getLayout() : string|false|null
Return values
string|false|null

getModuleName()

public getModuleName() : string
Return values
string

getPartial()

Get a partial template as a string.

public getPartial(string $templateName[, array<string|int, mixed> $vars = [] ]) : string
Parameters
$templateName : string

module/partial or just partial

$vars : array<string|int, mixed> = []
Return values
string

getRequestParameter()

public getRequestParameter(string $name[, mixed $default = null ]) : mixed
Parameters
$name : string
$default : mixed = null

getResponse()

public getResponse() : sfWebResponse
Return values
sfWebResponse

getSecurityConfiguration()

Get the full security configuration.

public getSecurityConfiguration() : array<string|int, mixed>
Return values
array<string|int, mixed>

getTemplate()

Get the template for this action.

public getTemplate() : string|null
Return values
string|null

getUser()

public getUser() : sfUser
Return values
sfUser

getVar()

public getVar(string $name) : mixed
Parameters
$name : string

handleError()

Handle validation error — called when validate() returns false.

public handleError() : string
Return values
string

sfView constant

hasRequestParameter()

public hasRequestParameter(string $name) : bool
Parameters
$name : string
Return values
bool

hasVar()

Check if a template variable exists.

public hasVar(string $name) : bool
Parameters
$name : string
Return values
bool

initialize()

Initialize the component.

public initialize(sfContext $context, string $moduleName, string $actionName) : mixed
Parameters
$context : sfContext
$moduleName : string
$actionName : string

isSecure()

Check if the action is secure.

public isSecure() : bool
Return values
bool

logMessage()

Log a message via event dispatcher.

public logMessage(string $message[, string $priority = 'info' ]) : mixed
Parameters
$message : string
$priority : string = 'info'

'info', 'warning', 'error', etc.

postExecute()

public postExecute() : mixed

preExecute()

public preExecute() : mixed

redirect()

Redirect to a URL.

public redirect(string $url[, int $statusCode = 302 ]) : mixed
Parameters
$url : string
$statusCode : int = 302
Tags
throws
sfStopException

Always thrown to stop execution

redirectToRoute()

Redirect to a route.

public redirectToRoute(string $route[, array<string|int, mixed> $params = [] ][, int $statusCode = 302 ]) : mixed
Parameters
$route : string
$params : array<string|int, mixed> = []
$statusCode : int = 302

renderPartial()

Include a partial template.

public renderPartial(mixed $templateName[, mixed $vars = [] ]) : mixed
Parameters
$templateName : mixed
$vars : mixed = []

renderText()

Render inline text (returns sfView::NONE).

public renderText(string $text) : string
Parameters
$text : string
Return values
string

sfView::NONE

setLayout()

Set the layout.

public setLayout(string|false $name) : mixed
Parameters
$name : string|false

Layout name or false to disable

setSecurityConfiguration()

Set the security configuration.

public setSecurityConfiguration(array<string|int, mixed> $security) : mixed
Parameters
$security : array<string|int, mixed>

setTemplate()

Set the template for this action.

public setTemplate(string $name[, string $module = null ]) : mixed
Parameters
$name : string

Template name (without suffix)

$module : string = null

Module name (current module if null)

setVar()

public setVar(string $name, mixed $value[, bool $safe = false ]) : mixed
Parameters
$name : string
$value : mixed
$safe : bool = false

Mark value as safe for output escaping

setViewClass()

Set the view class for this action.

public setViewClass(string $module, string $action, string $class) : mixed
Parameters
$module : string
$action : string
$class : string

validate()

Validate the request — returns true by default.

public validate() : bool
Return values
bool

        
On this page

Search results