|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace Jaxon\Dialogs; |
|
4
|
|
|
|
|
5
|
|
|
use Jaxon\Dialogs\Bootbox\BootboxLibrary; |
|
6
|
|
|
use Jaxon\Dialogs\Bootstrap\BootstrapLibrary; |
|
7
|
|
|
use Jaxon\Dialogs\PgwJs\PgwJsLibrary; |
|
8
|
|
|
use Jaxon\Dialogs\Toastr\ToastrLibrary; |
|
9
|
|
|
use Jaxon\Dialogs\JAlert\JAlertLibrary; |
|
10
|
|
|
use Jaxon\Dialogs\Tingle\TingleLibrary; |
|
11
|
|
|
use Jaxon\Dialogs\Noty\NotyLibrary; |
|
12
|
|
|
use Jaxon\Dialogs\Notify\NotifyLibrary; |
|
13
|
|
|
use Jaxon\Dialogs\Overhang\OverhangLibrary; |
|
14
|
|
|
use Jaxon\Dialogs\PNotify\PNotifyLibrary; |
|
15
|
|
|
use Jaxon\Dialogs\SweetAlert\SweetAlertLibrary; |
|
16
|
|
|
use Jaxon\Dialogs\JQueryConfirm\JQueryConfirmLibrary; |
|
17
|
|
|
use Jaxon\Dialogs\XDialog\XDialogLibrary; |
|
18
|
|
|
use Jaxon\Dialogs\CuteAlert\CuteAlertLibrary; |
|
19
|
|
|
use Jaxon\Exception\SetupException; |
|
20
|
|
|
use function Jaxon\jaxon; |
|
21
|
|
|
|
|
22
|
|
|
/** |
|
23
|
|
|
* @return void |
|
24
|
|
|
*/ |
|
25
|
|
|
function registerDialogLibraries() |
|
26
|
|
|
{ |
|
27
|
|
|
$aLibraries = [ |
|
28
|
|
|
BootboxLibrary::class, // Bootbox |
|
29
|
|
|
BootstrapLibrary::class, // Bootstrap |
|
30
|
|
|
PgwJsLibrary::class, // PgwJs |
|
31
|
|
|
ToastrLibrary::class, // Toastr |
|
32
|
|
|
JAlertLibrary::class, // JAlert |
|
33
|
|
|
TingleLibrary::class, // Tingle |
|
34
|
|
|
NotyLibrary::class, // Noty |
|
35
|
|
|
NotifyLibrary::class, // Notify |
|
36
|
|
|
OverhangLibrary::class, // Overhang |
|
37
|
|
|
PNotifyLibrary::class, // PNotify |
|
38
|
|
|
SweetAlertLibrary::class, // SweetAlert |
|
39
|
|
|
JQueryConfirmLibrary::class, // JQuery Confirm |
|
40
|
|
|
XDialogLibrary::class, // XDialog |
|
41
|
|
|
CuteAlertLibrary::class, // CuteAlert |
|
42
|
|
|
]; |
|
43
|
|
|
$jaxon = jaxon(); |
|
44
|
|
|
foreach($aLibraries as $sClass) |
|
45
|
|
|
{ |
|
46
|
|
|
try |
|
47
|
|
|
{ |
|
48
|
|
|
$jaxon->dialog()->registerLibrary($sClass, $sClass::NAME); |
|
49
|
|
|
} |
|
50
|
|
|
catch(SetupException $e){} |
|
|
|
|
|
|
51
|
|
|
} |
|
52
|
|
|
// Register the template dir into the template renderer |
|
53
|
|
|
$jaxon->template()->addNamespace('jaxon::dialogs', dirname(__DIR__) . '/templates'); |
|
54
|
|
|
} |
|
55
|
|
|
|
|
56
|
|
|
registerDialogLibraries(); |
|
57
|
|
|
|