Variables de Entorno
Versión 4 (Guillermo Zdanowicz, 25/02/2012 14:39)
| 1 | 1 | Guillermo Zdanowicz | h1. Variables de Entorno |
|---|---|---|---|
| 2 | 1 | Guillermo Zdanowicz | |
| 3 | 1 | Guillermo Zdanowicz | $this->getUser()->getProfile()->getIdsede() //un ejemplo para obtener datos |
| 4 | 2 | Guillermo Zdanowicz | |
| 5 | 2 | Guillermo Zdanowicz | en formularios se toma la variable |
| 6 | 2 | Guillermo Zdanowicz | |
| 7 | 2 | Guillermo Zdanowicz | sfContext::getInstance()->getUser()->getAttribute('nombrevariable') |
| 8 | 2 | Guillermo Zdanowicz | |
| 9 | 2 | Guillermo Zdanowicz | en el action se puede asignar |
| 10 | 2 | Guillermo Zdanowicz | |
| 11 | 2 | Guillermo Zdanowicz | $this->getUser()->setAttribute('nombrevariable',$mivalor); |
| 12 | 3 | Guillermo Zdanowicz | |
| 13 | 3 | Guillermo Zdanowicz | ALGUNOS PLUGINS REQUIEREN CORRER |
| 14 | 3 | Guillermo Zdanowicz | |
| 15 | 3 | Guillermo Zdanowicz | php symfony plugin:publish-assets |
| 16 | 3 | Guillermo Zdanowicz | |
| 17 | 4 | Guillermo Zdanowicz | esto anterior crea links en carpeta web |
| 18 | 4 | Guillermo Zdanowicz | |
| 19 | 4 | Guillermo Zdanowicz | saber cual es el modulo actual y el action |
| 20 | 4 | Guillermo Zdanowicz | |
| 21 | 4 | Guillermo Zdanowicz | Desde un Action |
| 22 | 4 | Guillermo Zdanowicz | |
| 23 | 4 | Guillermo Zdanowicz | 1 sfContext::getInstance()->getActionName(); |
| 24 | 4 | Guillermo Zdanowicz | 2 sfContext::getInstance()->getModuleName(); |
| 25 | 4 | Guillermo Zdanowicz | |
| 26 | 4 | Guillermo Zdanowicz | Desde un template: |
| 27 | 4 | Guillermo Zdanowicz | |
| 28 | 4 | Guillermo Zdanowicz | 1 $sf_context->getActionName(); |
| 29 | 4 | Guillermo Zdanowicz | 2 $sf_context->getModuleName(); |