Variables de Entorno¶
$this->getUser()->getProfile()->getIdsede() //un ejemplo para obtener datos
en formularios se toma la variable
sfContext::getInstance()->getUser()->getAttribute('nombrevariable')
en el action se puede asignar
$this->getUser()->setAttribute('nombrevariable',$mivalor);
ALGUNOS PLUGINS REQUIEREN CORRER
php symfony plugin:publish-assets
esto anterior crea links en carpeta web
saber cual es el modulo actual y el action
Desde un Action
1 sfContext::getInstance()->getActionName();
2 sfContext::getInstance()->getModuleName();
Desde un template:
1 $sf_context->getActionName();
2 $sf_context->getModuleName();