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

Tag::dashboard()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
namespace Redaxscript\Admin\Template;
3
4
use Redaxscript\Admin;
5
use Redaxscript\Language;
6
use Redaxscript\Registry;
7
use Redaxscript\Template\Tag as BaseTag;
8
9
/**
10
 * parent class to provide admin template tags
11
 *
12
 * @since 4.0.0
13
 *
14
 * @package Redaxscript
15
 * @category Template
16
 * @author Henry Ruhs
17
 */
18
19
class Tag extends BaseTag
20
{
21
	/**
22
	 * dashboard
23
	 *
24
	 * @since 4.1.0
25
	 *
26
	 * @param array $optionArray options of the dashboard
27
	 *
28
	 * @return string
29
	 */
30
31 1
	public static function dashboard(array $optionArray = []) : string
32
	{
33 1
		$dashboard = new Admin\View\Helper\Dashboard(Registry::getInstance(), Language::getInstance());
34 1
		return $dashboard->init($optionArray)->render();
35
	}
36
37
	/**
38
	 * panel
39
	 *
40
	 * @since 4.0.0
41
	 *
42
	 * @param array $optionArray options of the panel
43
	 *
44
	 * @return string
45
	 */
46
47
	public static function panel(array $optionArray = []) : string
48
	{
49
		$panel = new Admin\View\Helper\Panel(Registry::getInstance(), Language::getInstance());
50
		return $panel->init($optionArray)->render();
51
	}
52
}
53