Frontend\Core\Engine\Header::addJsData PHP Method

addJsData() public method

Add data into the jsData
public addJsData ( string $module, string $key, mixed $value )
$module string The name of the module.
$key string The key whereunder the value will be stored.
$value mixed The value
    public function addJsData($module, $key, $value)
    {
        $this->jsData[$module][$key] = $value;
    }

Usage Example

Beispiel #1
0
 /**
  * Add data that should be available in JS
  *
  * @param string $key The key whereunder the value will be stored.
  * @param mixed $value The value to pass.
  */
 public function addJSData($key, $value)
 {
     $this->header->addJsData($this->getModule(), $key, $value);
 }