CakePhp 4 Ändern der Layoutansicht in einer Methode

//chnage the layout in Cakephp 4 with the layout file called ajax.php
$this->viewBuilder()->setLayout('ajax');
Fierce Falcon