PHP code example of kriss / yii2-adminlte-iframe-mode

1. Go to this page and download the library: Download kriss/yii2-adminlte-iframe-mode library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

kriss / yii2-adminlte-iframe-mode example snippets



use kriss\iframeLayout\component\IframeMode;

return [
    'components' => [
        IframeMode::COMPONENT_NAME => [
            'class' => IframeMode::class,
            'enable' => true,
            'defaultSwitch' => true,
        ],
    ]
];



use kriss\iframeLayout\filter\IframeLinkFilter;

public function behaviors()
{
    $behaviors = parent::behaviors();

    $behaviors['iframe_layout'] = [
        'class' => IframeLinkFilter::className(),
        //'layout' => '@app/views/layouts/main-content', // 使用该参数自定义布局
    ];

    return $behaviors;
}


\kriss\iframeLayout\widget\IframeModeAssetWidget::widget();


use kriss\iframeLayout\action\IframeModeSwitchAction;

public function actions()
{
    return [
        // 其他 actions
        'iframe-mode-switch' => [
            'class' => IframeModeSwitchAction::className(),
        ]
    ];
}

<?= \kriss\iframeLayout\widget\IframeModeSwitchWidget::widget()