*The symfony sentence to get present module name
$module_name = sfContext::getInstance()->getModuleName();
For templates
$module_name = $sf_context->getModuleName();
$module_name = $sf_params->get('module');
Example: contents of $module_name:'index'
*The symfony sentence to get present action name
action_name = sfContext::getInstance()->getActionName();
For templates
$action_name = $sf_context->getActionName();
$action_name = $sf_params->get('action');
Example: contents of $action_name:'edit'(its initial is returned in a small letter)
The article is from: http://it.kndb.net/entry/show/id/250
No comments:
Post a Comment