PHP code example of conquer / modal

1. Go to this page and download the library: Download conquer/modal 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/ */

    

conquer / modal example snippets


\conquer\modal\ModalForm::widget([
    'selector' => '.modal-form',
]);

    echo Html::a('Some modal action', ['controller/action'], ['class' => 'modal-form']);

class Controller extends \yii\web\Controller
{
    /**
     * Exclude layout rendering when ajax requests
     */
    public function render($view, $params = [])
    {
        if (\Yii::$app->request->isAjax) {
            return $this->renderPartial($view, $params);
        }
        return parent::render($view, $params);
    }
}

$ php composer.phar