protected function getLayout(string $layout = null): string
    {
        if ($layout === null) {
            $frontendBridgeComponentExists = isset($this->FrontendBridge);
            $layout = 'FrontendBridge.json_action';

            if ($frontendBridgeComponentExists) {
                $layout = $this->FrontendBridge->config('templatePaths.jsonAction');
            }

            if ($this->request->is('dialog')) {
                $layout = 'FrontendBridge.dialog_action';

                if ($frontendBridgeComponentExists) {
                    $layout = $this->FrontendBridge->config('templatePaths.dialogAction');
                }
            }
        }

        return $layout;
    }
protected function getLayout(string $layout = null): string
    {
        if ($layout === null) {
            $frontendBridgeComponentExists = isset($this->FrontendBridge);
            $layout = 'FrontendBridge.json_action';

            if ($frontendBridgeComponentExists) {
                $layout = $this->FrontendBridge->config('templatePaths.jsonAction');
            }

            if ($this->request->is('dialog')) {
                $layout = 'FrontendBridge.dialog_action';

                if ($frontendBridgeComponentExists) {
                    $layout = $this->FrontendBridge->config('templatePaths.dialogAction');
                }
            }
        }

        return $layout;
    }
protected function getLayout ( string $ layout = null ) : string { if ( $ layout === null ) { $ frontendBridgeComponentExists = isset ( $ this -> FrontendBridge ) ; $ layout = 'FrontendBridge.json_action' ; if ( $ frontendBridgeComponentExists ) { $ layout = $ this -> FrontendBridge -> config ( 'templatePaths.jsonAction' ) ; } if ( $ this -> request -> is ( 'dialog' ) ) { $ layout = 'FrontendBridge.dialog_action' ; if ( $ frontendBridgeComponentExists ) { $ layout = $ this -> FrontendBridge -> config ( 'templatePaths.dialogAction' ) ; } } } return $ layout ; }
Returns a layout to render.

@param string $layout the layout path
@return string
Returns a layout to render .