protected function getLayoutOptions($layout)
    {
        // If passed a layout, use that for any request.
        if (! is_null($layout)) {
            return [
                'default' => $layout,
                'ajax'    => $layout,
            ];
        }

        // If a set of layout options is defined, use those.
        if (isset($this->layoutOptions)) {
            return $this->layoutOptions;
        }

        // Use nothing.
        return null;
    }