Skip to content

Plesk extension for Yii2 framework to extend it's PJAX functions

License

Notifications You must be signed in to change notification settings

DmitriyShiryaev/yii2-pjax

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Plesk extension for Yii2 framework to extend it's PJAX functions

Installation

The preferred way to install this extension is through composer.

  • Add the following lines to your composer.json file:

    "repositories": [
        {
            "type": "vcs",
            "url":  "[email protected]:plesk/yii2-pjax.git"
        }
    ]
  • Run composer require "plesk/yii2-pjax:^1.0.0"

API

Setup the component in your web.php config:

[
    'components' => [
        'pjax' => [
            'class' => 'plesk\yii2pjax\Component',
        ],
    ],
]

Convert PJAX config from Yii2 widget format to JS format.

$this->registerJs(
    '$("#plesk-pjax-search-form").on("pjax:success", function() {
        $.pjax.reload(' . Json::encode(Yii::$app->pjax->pjaxConvertConfigWidgetToJs($gridPjaxOptions)) . ');
    });'
);

Exceptions

- plesk\yii2pjax\exceptions\Exception

    All exceptions thrown by the extension, extend this exception.

About

Plesk extension for Yii2 framework to extend it's PJAX functions

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%