original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Returns a layout to render.
  
  @param string $layout the layout path
  @return string
docstring_tokens: Returns a layout to render .