1. Go to this page and download the library: Download aygon/jatun 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/ */
aygon / jatun example snippets
$env = new \Jatun\Environment()
$env->addEvent(\Jatun\Event\HtmlEvent())
$env->addEvent(\Jatun\Event\FlashmessageEvent())
...
$env->addEvent(\Jatun\Event\HtmlEvent())
echo $env->parse(array(
'html' => array(
'id' => 'html-node-id',
'content' => 'new html content of the node'
)
);
$env->addEvent(\Jatun\Event\FlashmessageEvent())
echo $env->parse(array(
'flashmessage' => array(
'id' => 'html-node-id',
'error|notice|success' => 'the text of the flashmessage',
[optional]
'duration' => 3000 // ms
)
);
$env->addEvent(\Jatun\Event\DialogOpenEvent())
echo $env->parse(array(
'dialog.open' => array(
'id' => 'dialog-id',
'title' => 'the title of the dialog',
'content' => 'the html content of the dialog',
[optional]
'width' => 800, // px
'height' => 600 // px
)
);
$env->addEvent(\Jatun\Event\DialogTitleEvent())
echo $env->parse(array(
'dialog.title' => array(
'id' => 'dialog-id',
'title' => 'the title of the dialog'
)
);