-
forward ($module, $action)
Browse code
| $module |
A module name |
| $action |
An action name |
Forwards current action to a new one (without browser redirection).
This method stops the action. So, no code is executed after a call to this method.
throws sfStopException
-
| $message |
Message of the generated exception |
Forwards current action to the default 404 error action.
throws sfError404Exception
-
forward404If ($condition, $message)
Browse code
| $condition |
A condition that evaluates to true or false |
| $message |
Message of the generated exception |
Forwards current action to the default 404 error action if the specified condition is true.
throws sfError404Exception
-
forward404Unless ($condition, $message)
Browse code
| $condition |
A condition that evaluates to true or false |
| $message |
Message of the generated exception |
Forwards current action to the default 404 error action unless the specified condition is true.
throws sfError404Exception
-
forwardIf ($condition, $module, $action)
Browse code
| $condition |
A condition that evaluates to true or false |
| $module |
A module name |
| $action |
An action name |
If the condition is true, forwards current action to a new one (without browser redirection).
This method stops the action. So, no code is executed after a call to this method.
throws sfStopException
-
forwardUnless ($condition, $module, $action)
Browse code
| $condition |
A condition that evaluates to true or false |
| $module |
A module name |
| $action |
An action name |
Unless the condition is true, forwards current action to a new one (without browser redirection).
This method stops the action. So, no code is executed after a call to this method.
throws sfStopException
-
(string) get404Message ($message)
Browse code
| $message |
An error message (null by default) |
Returns a formatted message for a 404 error.
returns The error message or a default one if null
-
(string) getComponent ($moduleName, $componentName, $vars)
Browse code
| $moduleName |
module name |
| $componentName |
component name |
| $vars |
vars |
Returns the component rendered content.
If the vars parameter is omitted, the action's internal variables
will be passed, just as it would to a normal template.
If the vars parameter is set then only those values are
available in the component.
returns The component rendered content
-
(mixed) getCredential ()
Browse code
Gets credentials the user must have to access this action.
returns An array or a string describing the credentials the user must have to access this action
-
Gets the name of the alternate layout for this sfAction.
WARNING: It only returns the layout you set with the setLayout() method,
and does not return the layout that you configured in your view.yml.
returns Layout name. Returns null if no layout has been set within the action
-
(string) getPartial ($templateName, $vars)
Browse code
| $templateName |
partial name |
| $vars |
vars |
Returns the partial rendered content.
If the vars parameter is omitted, the action's internal variables
will be passed, just as it would to a normal template.
If the vars parameter is set then only those values are
available in the partial.
returns The partial content
-
Returns the current route for this request
returns The route for the request
-
(string) getSecurityConfiguration ()
Browse code
Returns the security configuration for this module.
returns Current security configuration as an array
-
(mixed) getSecurityValue ($name, $default)
Browse code
| $name |
The name of the value to pull from security.yml |
| $default |
The default value to return if none is found in security.yml |
Returns a value from security.yml.
-
(string) getTemplate ()
Browse code
Gets the name of the alternate template for this sfAction.
WARNING: It only returns the template you set with the setTemplate() method,
and does not return the template that you configured in your view.yml.
See 'Naming Conventions' in the 'Symfony View' documentation.
returns Template name. Returns null if no template has been set within the action
-
(bool) initialize ($context, $moduleName, $actionName)
Browse code
| $context |
The current application context. |
| $moduleName |
The module name. |
| $actionName |
The action name. |
Initializes this action.
returns true, if initialization completes successfully, otherwise false
-
Indicates that this action requires security.
returns true, if this action requires security, otherwise false.
-
Execute an application defined process immediately after execution of this sfAction object.
By default, this method is empty.
-
Executes an application defined process prior to execution of this sfAction object.
By default, this method is empty.
-
redirect ($url, $statusCode)
Browse code
| $url |
Url |
| $statusCode |
Status code (default to 302) |
Redirects current request to a new URL.
2 URL formats are accepted :
- a full URL: http://www.google.com/
- an internal URL (url_for() format): module/action
This method stops the action. So, no code is executed after a call to this method.
throws sfStopException
-
Redirects current action to the default 404 error action (with browser redirection).
This method stops the current code flow.
-
redirectIf ($condition, $url, $statusCode)
Browse code
| $condition |
A condition that evaluates to true or false |
| $url |
Url |
| $statusCode |
Status code (default to 302) |
Redirects current request to a new URL, only if specified condition is true.
This method stops the action. So, no code is executed after a call to this method.
throws sfStopException
-
redirectUnless ($condition, $url, $statusCode)
Browse code
| $condition |
A condition that evaluates to true or false |
| $url |
Url |
| $statusCode |
Status code (default to 302) |
Redirects current request to a new URL, unless specified condition is true.
This method stops the action. So, no code is executed after a call to this method.
throws sfStopException
-
(sfView::NONE) renderComponent ($moduleName, $componentName, $vars)
Browse code
| $moduleName |
module name |
| $componentName |
component name |
| $vars |
vars |
Appends the result of the given component execution to the response content.
This method must be called as with a return:
return $this->renderComponent('foo', 'bar')
-
(sfView::NONE) renderPartial ($templateName, $vars)
Browse code
| $templateName |
partial name |
| $vars |
vars |
Appends the result of the given partial execution to the response content.
This method must be called as with a return:
return $this->renderPartial('foo/bar')
-
(sfView::NONE) renderText ($text)
Browse code
| $text |
Text to append to the response |
Appends the given text to the response content and bypasses the built-in view system.
This method must be called as with a return:
return $this->renderText('some text')
-
| $name |
Layout name or false to de-activate the layout |
Sets an alternate layout for this sfAction.
To de-activate the layout, set the layout name to false.
To revert the layout to the one configured in the view.yml, set the template name to null.
-
setSecurityConfiguration ($security)
Browse code
| $security |
The new security configuration |
Overrides the current security configuration for this module.
-
setTemplate ($name, $module)
Browse code
| $name |
Template name |
| $module |
The module (current if null) |
Sets an alternate template for this sfAction.
See 'Naming Conventions' in the 'Symfony View' documentation.
-
Changes the default view class used for rendering the template associated with the current action.