Skip to content
  • mattab's avatar
    c22a0017
    Allow templates postEvent() calls to also pass parameters. For example this is... · c22a0017
    mattab a rédigé
    Allow templates postEvent() calls to also pass parameters. For example this is done in the twig template:
    ```
    {{ postEvent("Template.jsGlobalVariables", minDateYear, maxDateYear) }}
    ```
    and you can hook on this event, by doing:
    ```
        public function addTrackingHostnamesToJs(&$out, $minDateYear, $maxDateYear)
        {
            // printout out the data as a comment for testing
            $out .= "/* " . $minDateYear . " - " . $maxDateYear . " */";
    ```
    c22a0017
    Allow templates postEvent() calls to also pass parameters. For example this is...
    mattab a rédigé
    Allow templates postEvent() calls to also pass parameters. For example this is done in the twig template:
    ```
    {{ postEvent("Template.jsGlobalVariables", minDateYear, maxDateYear) }}
    ```
    and you can hook on this event, by doing:
    ```
        public function addTrackingHostnamesToJs(&$out, $minDateYear, $maxDateYear)
        {
            // printout out the data as a comment for testing
            $out .= "/* " . $minDateYear . " - " . $maxDateYear . " */";
    ```
Chargement en cours