core/web/JsonLd.php
protected static function registerView()
    {
        if (self::$_view === null) {
            Yii::$app->view->on(View::EVENT_BEGIN_BODY, function ($event) {
                echo '<script type="application/ld+json">' . Json::encode($event->sender->params) . '</script>';
            });
                    
            self::$_view = true;
        }
    }
protected static function registerView()
    {
        if (self::$_view === null) {
            Yii::$app->view->on(View::EVENT_BEGIN_BODY, function ($event) {
                echo '<script type="application/ld+json">' . Json::encode($event->sender->params) . '</script>';
            });
                    
            self::$_view = true;
        }
    }
protected static function registerView ( ) { if ( self :: $ _view === null ) { Yii :: $ app -> view -> on ( View :: EVENT_BEGIN_BODY , function ( $ event ) { echo '<script type="application/ld+json">' . Json :: encode ( $ event -> sender -> params ) . '</script>' ; } ) ; self :: $ _view = true ; } }
Register the view file an observe the event which then reads the data from @graph params key.
Register the view file an observe the event which then reads the data from