public function setFrontendData($key, $value = null): void
    {
        if (is_array($key)) {
            foreach ($key as $k => $v) {
                $this->setFrontendData($k, $v);
            }
            return;
        }
        $this->_frontendData['jsonData'][$key] = $value;
    }
public function setFrontendData($key, $value = null): void
    {
        if (is_array($key)) {
            foreach ($key as $k => $v) {
                $this->setFrontendData($k, $v);
            }
            return;
        }
        $this->_frontendData['jsonData'][$key] = $value;
    }
public function setFrontendData ( $ key , $ value = null ) : void { if ( is_array ( $ key ) ) { foreach ( $ key as $ k => $ v ) { $ this -> setFrontendData ( $ k , $ v ) ; } return ; } $ this -> _frontendData [ 'jsonData' ] [ $ key ] = $ value ; }
Allows manipulating frontend data

@param string|array $key Either the key or an array
@param mixed $value Value
@return void
Allows manipulating frontend data