PHP code example of raoul2000 / yii2-guiders-widget
1. Go to this page and download the library: Download raoul2000/yii2-guiders-widget 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/ */
raoul2000 / yii2-guiders-widget example snippets
// creates the first guider
raoul2000\widget\guiders\Guiders::widget([
'show' => true,
'pluginOptions' => [
'buttons' => [['name' => "Next"]],
'description' => "<b>Guiders</b> are a user interface design pattern for introducing features "
. " of software. This dialog box, for example, is the first in a series of guiders "
. " that together make up a guide.",
'id' => "first",
'next' => "second",
'overlay' => true,
'title' => "Welcome to Guiders.js!",
'closeOnEscape' => true,
'xButton' => true,
'width' => 500
]
]);
// creates the second guider. Note that 'show' is false by default.
raoul2000\widget\guiders\Guiders::widget([
'pluginOptions' => [
'buttons' => [['name' => "Next"]],
'description' => "This is an intresting lorem ipsum colomn or what !",
'id' => 'second',
'next' => 'third',
'overlay' => true,
'title' => "Focus",
'closeOnEscape' => true,
'xButton' => true,
'width' => 500,
'attachTo' => '#focusHere',
'autoFocus' => true,
'highlight' => '#focusHere',
'position' => 6
]
]);
// creates the third guider.
raoul2000\widget\guiders\Guiders::widget([
'pluginOptions' => [
'buttons' => [
[
'name' => "Done",
'onclick' => new yii\web\JsExpression('function(){guiders.hideAll();}')
],
[
// if name is "close", "next", or "back",
// onclick defaults to guiders.hideAll, guiders.next, or guiders.prev respectively)
'name' => 'back'
],
[
'name' => 'before you leave!',
'onclick' => new yii\web\JsExpression('function(){alert("thanks for joining our Guiders Tour !");}')
]
],
'description' => "That's all folks...well not exactly. There are <b>plenty</b> of nice options to play with"
." so to create a nice tour. <h4>Check the Guiders-JS page</h4>",
'id' => "third",
'title' => "Welcome to Guiders.js!",
'closeOnEscape' => true,
'xButton' => true,
'width' => 400
]
]);
php composer.phar
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.