1 <?php
2
3 4 5 6 7 8 9 10
11
12 namespace Icybee\Installer;
13
14 use Brickrouge\Button;
15 use Brickrouge\Element;
16 use Brickrouge\ElementIsEmpty;
17
18 19 20
21 class WelcomePanel extends Element
22 {
23 public function __construct()
24 {
25 $action = new Button("Let's go!", array('class' => 'btn btn-large', 'type' => 'submit'));
26
27 parent::__construct
28 (
29 'div', array
30 (
31 PanelDecorator::TITLE => t('panel.welcome.title'),
32 PanelDecorator::DESCRIPTION => t('panel.welcome.description', array('action' => $action)),
33
34 Element::CHILDREN => array
35 (
36 WelcomeRequirements::get()->render()
37 ),
38
39 'name' => 'welcome',
40 'data-message' => t('panel.welcome.success')
41 )
42 );
43 }
44
45 46 47
48 protected function render_inner_html()
49 {
50 $html = parent::render_inner_html();
51
52 if (!$html)
53 {
54 throw new ElementIsEmpty;
55 }
56
57 return $html;
58 }
59 }