These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | namespace Redaxscript\Modules\TestDummy; |
||
3 | |||
4 | use Redaxscript\Module; |
||
5 | |||
6 | /** |
||
7 | * dummy for testing purpose |
||
8 | * |
||
9 | * @since 2.6.0 |
||
10 | * |
||
11 | * @package Redaxscript |
||
12 | * @category Modules |
||
13 | * @author Henry Ruhs |
||
14 | */ |
||
15 | |||
16 | class TestDummy extends Module\Metadata |
||
17 | { |
||
18 | /** |
||
19 | * array of the module |
||
20 | * |
||
21 | * @var array |
||
22 | */ |
||
23 | |||
24 | protected static array $_moduleArray = |
||
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
25 | [ |
||
26 | 'name' => 'Test Dummy', |
||
27 | 'alias' => 'TestDummy', |
||
28 | 'author' => 'Redaxmedia', |
||
29 | 'description' => 'Dummy for testing purpose', |
||
30 | 'version' => '0.0.0', |
||
31 | 'license' => 'MIT' |
||
32 | ]; |
||
33 | |||
34 | /** |
||
35 | * adminDashboard |
||
36 | * |
||
37 | * @since 4.1.0 |
||
38 | * |
||
39 | * @return array |
||
40 | */ |
||
41 | |||
42 | public function adminDashboard() : array |
||
43 | { |
||
44 | $this->setDashboard('Test Dummy', 1); |
||
45 | $this->setDashboard('Test Dummy', 2); |
||
46 | $this->setDashboard('Test Dummy', 1); |
||
47 | return $this->getDashboardArray(); |
||
48 | } |
||
49 | |||
50 | /** |
||
51 | * adminNotification |
||
52 | * |
||
53 | * @since 4.1.0 |
||
54 | * |
||
55 | * @return array |
||
56 | */ |
||
57 | |||
58 | public function adminNotification() : array |
||
59 | { |
||
60 | $this->setNotification('success', |
||
61 | [ |
||
62 | 'text' => 'Success', |
||
63 | 'attr' => |
||
64 | [ |
||
65 | 'href' => 'http://localhost', |
||
66 | 'target' => '_blank' |
||
67 | ] |
||
68 | ]); |
||
69 | $this->setNotification('warning', 'Warning'); |
||
70 | $this->setNotification('error', 'Error'); |
||
71 | $this->setNotification('info', 'Info'); |
||
72 | return $this->getNotificationArray(); |
||
73 | } |
||
74 | |||
75 | /** |
||
76 | * render |
||
77 | * |
||
78 | * @since 3.1.0 |
||
79 | * |
||
80 | * @param int $firstNumber |
||
81 | * @param int $secondNumber |
||
82 | * |
||
83 | * @return string |
||
84 | */ |
||
85 | |||
86 | public function render(int $firstNumber = 1, int $secondNumber = 1) : string |
||
87 | { |
||
88 | return $this->_language->get('_number')[$firstNumber + $secondNumber]; |
||
89 | } |
||
90 | } |
||
91 |