HCE Project DC service web UI  0.2
Hierarchical Cluster Engine DC service web UI
 All Classes Namespaces Files Functions Variables Pages
TbHeroUnit.php
Go to the documentation of this file.
1 <?php
20 class TbHeroUnit extends CWidget
21 {
25  public $heading;
26 
30  public $encodeHeading = true;
31 
35  public $htmlOptions = array();
36 
41  public $headingOptions = array();
42 
48  public function init()
49  {
50  if (isset($this->htmlOptions['class'])) {
51  $this->htmlOptions['class'] .= ' hero-unit';
52  } else {
53  $this->htmlOptions['class'] = 'hero-unit';
54  }
55 
56  echo CHtml::openTag('div', $this->htmlOptions);
57 
58  if ($this->encodeHeading) {
59  $this->heading = CHtml::encode($this->heading);
60  }
61 
62  if (isset($this->heading)) {
63  echo CHtml::tag('h1', $this->headingOptions, $this->heading);
64  }
65  }
66 
72  public function run()
73  {
74  echo CHtml::closeTag('div');
75  }
76 }