Issues (686)

jaxon-examples/examples/dialogs/page.php (5 issues)

Labels
Severity
1
<?php
2
3
use Jaxon\App\Dialog\Library\AlertInterface;
4
use Jaxon\App\Dialog\Library\ConfirmInterface;
5
use Jaxon\App\Dialog\Library\ModalInterface;
6
7
$aLibraries = [
8
    // Alertify
9
    'alertify'      => [
10
        'name' => 'Alertify',
11
        'class' => Jaxon\Dialogs\Dialog\Library\Alertify::class,
12
    ],
13
    // Bootbox
14
    'bootbox'       => [
15
        'name' => 'Bootbox',
16
        'class' => Jaxon\Dialogs\Dialog\Library\Bootbox::class,
17
    ],
18
    // Quantum
19
    'quantum'     => [
20
        'name' => 'Quantum Alert',
21
        'class' => Jaxon\Dialogs\Dialog\Library\Quantum::class,
22
    ],
23
    // Butterup
24
    'butterup'     => [
25
        'name' => 'Butterup',
26
        'class' => Jaxon\Dialogs\Dialog\Library\Butterup::class,
27
    ],
28
    // CuteAlert
29
    'cute'          => [
30
        'name' => 'CuteAlert',
31
        'class' => Jaxon\Dialogs\Dialog\Library\CuteAlert::class,
32
    ],
33
    // Toastr
34
    'toastr'        => [
35
        'name' => 'Toastr',
36
        'class' => Jaxon\Dialogs\Dialog\Library\Toastr::class,
37
    ],
38
    // JAlert
39
    'jalert'        => [
40
        'name' => 'JAlert',
41
        'class' => Jaxon\Dialogs\Dialog\Library\JAlert::class,
42
    ],
43
    // Tingle
44
    'tingle'        => [
45
        'name' => 'Tingle',
46
        'class' => Jaxon\Dialogs\Dialog\Library\Tingle::class,
47
    ],
48
    // Noty
49
    'noty'          => [
50
        'name' => 'Noty',
51
        'class' => Jaxon\Dialogs\Dialog\Library\Noty::class,
52
    ],
53
    // Notyf
54
    'notyf'         => [
55
        'name' => 'Notyf',
56
        'class' => Jaxon\Dialogs\Dialog\Library\Notyf::class,
57
    ],
58
    // Notify
59
    'notify'        => [
60
        'name' => 'Notify',
61
        'class' => Jaxon\Dialogs\Dialog\Library\Notify::class,
62
    ],
63
    // IziToast
64
    'izitoast'     => [
65
        'name' => 'IziToast',
66
        'class' => Jaxon\Dialogs\Dialog\Library\IziToast::class,
67
    ],
68
    // SweetAlert
69
    'sweetalert'    => [
70
        'name' => 'SweetAlert',
71
        'class' => Jaxon\Dialogs\Dialog\Library\SweetAlert::class,
72
    ],
73
    // JQuery Confirm
74
    'jconfirm'      => [
75
        'name' => 'JQueryConfirm',
76
        'class' => Jaxon\Dialogs\Dialog\Library\JQueryConfirm::class,
77
    ],
78
];
79
?>
80
<?php $this->extends('templates::examples/layout.php') ?>
81
82
<?php $this->block('content') ?>
83
                <div class="row">
84
<?php foreach($aLibraries as $id => $lib): ?>
85
                    <div class="col-md-12">
86
                        <?= $lib['name'] ?>
87
                    </div>
88
<?php if(is_subclass_of($lib['class'], AlertInterface::class)): ?>
89
                    <div class="col-md-12" style="padding-bottom: 15px;">
90
                        <button type="button" class="btn btn-primary" <?php
91
                            echo attr()->click(rq(HelloWorld::class)->showSuccess($id, $lib['name'])) ?>>Success</button>
0 ignored issues
show
The method showSuccess() does not exist on Jaxon\Script\Call\JxnCall. Since you implemented __call, consider adding a @method annotation. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

91
                            echo attr()->click(rq(HelloWorld::class)->/** @scrutinizer ignore-call */ showSuccess($id, $lib['name'])) ?>>Success</button>
Loading history...
92
                        <button type="button" class="btn btn-primary" <?php
93
                            echo attr()->click(rq(HelloWorld::class)->showInfo($id, $lib['name'])) ?>>Info</button>
0 ignored issues
show
The method showInfo() does not exist on Jaxon\Script\Call\JxnCall. Since you implemented __call, consider adding a @method annotation. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

93
                            echo attr()->click(rq(HelloWorld::class)->/** @scrutinizer ignore-call */ showInfo($id, $lib['name'])) ?>>Info</button>
Loading history...
94
                        <button type="button" class="btn btn-primary" <?php
95
                            echo attr()->click(rq(HelloWorld::class)->showWarning($id, $lib['name'])) ?>>Warning</button>
0 ignored issues
show
The method showWarning() does not exist on Jaxon\Script\Call\JxnCall. Since you implemented __call, consider adding a @method annotation. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

95
                            echo attr()->click(rq(HelloWorld::class)->/** @scrutinizer ignore-call */ showWarning($id, $lib['name'])) ?>>Warning</button>
Loading history...
96
                        <button type="button" class="btn btn-primary" <?php
97
                            echo attr()->click(rq(HelloWorld::class)->showError($id, $lib['name'])) ?>>Error</button>
0 ignored issues
show
The method showError() does not exist on Jaxon\Script\Call\JxnCall. Since you implemented __call, consider adding a @method annotation. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

97
                            echo attr()->click(rq(HelloWorld::class)->/** @scrutinizer ignore-call */ showError($id, $lib['name'])) ?>>Error</button>
Loading history...
98
                    </div>
99
<?php endif ?>
100
<?php if(is_subclass_of($lib['class'], ConfirmInterface::class)): ?>
101
                    <div class="col-md-12" style="padding-bottom: 15px;">
102
                        <button type="button" class="btn btn-primary"
103
                            onclick="jaxon.confirm('<?= $id ?>', { title: 'Confirm', text: 'Really?' }, {
104
                                yes: () => jaxon.alert('<?= $id ?>', { type: 'info', title: 'Info', text: 'Oh! Yeah!!!' }),
105
                                no: () => jaxon.alert('<?= $id ?>', { type: 'warning', title: 'Warning', text: 'So Sorry!!!' }),
106
                            })" >Confirm</button>
107
                    </div>
108
<?php endif ?>
109
<?php if(is_subclass_of($lib['class'], ModalInterface::class)): ?>
110
                    <div class="col-md-12" style="padding-bottom: 15px;">
111
                        <button type="button" class="btn btn-primary" <?php
112
                            echo attr()->click(rq(HelloWorld::class)->showDialog($id, $lib['name'])) ?>>Modal</button>
0 ignored issues
show
The method showDialog() does not exist on Jaxon\Script\Call\JxnCall. Since you implemented __call, consider adding a @method annotation. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

112
                            echo attr()->click(rq(HelloWorld::class)->/** @scrutinizer ignore-call */ showDialog($id, $lib['name'])) ?>>Modal</button>
Loading history...
113
                    </div>
114
<?php endif ?>
115
<?php endforeach ?>
116
                </div>
117
<?php $this->endblock() ?>
118