HEX
Server: LiteSpeed
System: Linux premium260.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
User: aliazzsr (627)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: /home/aliazzsr/api.crm.vqode.com/vendor/yii2mod/yii2-swagger/SwaggerUIRenderer.php
<?php

namespace yii2mod\swagger;

use yii\base\Action;

/**
 * Class SwaggerUIRenderer renders the UI (HTML/JS/CSS).
 *
 * @package yii2mod\swagger
 */
class SwaggerUIRenderer extends Action
{
    /**
     * @var string the rest url configuration
     */
    public $restUrl;

    /**
     * @var string base swagger template
     */
    public $view = '@vendor/yii2mod/yii2-swagger/views/index';

    /**
     * @var null|string|false the name of the layout to be applied to this controller's views.
     * This property mainly affects the behavior of [[render()]].
     * Defaults to null, meaning the actual layout value should inherit that from [[module]]'s layout value.
     * If false, no layout will be applied.
     */
    public $layout = false;

    /**
     * @inheritdoc
     */
    public function run()
    {
        $this->controller->layout = $this->layout;

        return $this->controller->render($this->view, [
            'restUrl' => $this->restUrl,
        ]);
    }
}