plesk / yii2-pjax
Plesk extension for Yii2 framework to extend it's PJAX functions.
Installs: 102
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 24
Forks: 1
Open Issues: 0
Type:yii2-extension
Requires
- php: >=5.4
- yiisoft/yii2: ^2.0.5
This package is auto-updated.
Last update: 2024-10-24 18:58:46 UTC
README
Installation
The preferred way to install this extension is through composer.
-
Add the following lines to your
composer.json
file:"repositories": [ { "type": "vcs", "url": "git@github.com: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.