$layout->toArray() The result is being sent to the editor via the API in the panel kirby/src/Cms/Layout.php#L120 $layout->toArray(): array Return type array Parent class Kirby\Cms\Layout