Completed
Push — master ( 29f0c5...0d72ed )
by Henry
09:47
created

TestDummy::adminDashboard()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
namespace Redaxscript\Modules\TestDummy;
3
4
use Redaxscript\Module;
5
6
/**
7
 * test dummy
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 $_moduleArray =
25
	[
26
		'name' => 'Test Dummy',
27
		'alias' => 'TestDummy',
28
		'author' => 'Redaxmedia',
29
		'description' => 'Test Dummy',
30
		'version' => '4.1.0'
31
	];
32
33
	/**
34
	 * adminDashboard
35
	 *
36
	 * @since 4.1.0
37
	 *
38
	 * @return array
39
	 */
40
41
	public function adminDashboard() : array
42
	{
43
		$this->setDashboard('Test Dummy', 2);
44
		return $this->getDashboardArray();
45
	}
46
47
	/**
48
	 * adminNotification
49
	 *
50
	 * @since 4.1.0
51
	 *
52
	 * @return array
53
	 */
54
55
	public function adminNotification() : array
56
	{
57
		$this->setNotification('success',
58
		[
59
			'text' => 'Success',
60
			'attr' =>
61
			[
62
				'href' => 'http://localhost',
63
				'target' => '_blank'
64
			]
65
		]);
66
		$this->setNotification('warning', 'Warning');
67
		$this->setNotification('error', 'Error');
68
		$this->setNotification('info', 'Info');
69
		return $this->getNotificationArray();
70
	}
71
72
	/**
73
	 * render
74
	 *
75
	 * @since 3.1.0
76
	 *
77
	 * @param int $firstNumber
78
	 * @param int $secondNumber
79
	 *
80
	 * @return string
81
	 */
82
83
	public function render(int $firstNumber = 1, int $secondNumber = 1) : string
84
	{
85
		return $this->_language->get('_number')[$firstNumber + $secondNumber];
86
	}
87
}
88