1 <?php
2 3 4 5 6 7
8
9 namespace foundation\helpers;
10
11 use foundation\enum\Enum;
12
13 14 15 16 17 18 19 20
21 class Pricing
22 {
23 24 25 26 27 28 29 30 31
32 public static function table($title, $price, $description, $items = array(), $button = null)
33 {
34 $list = array();
35 $list[] = \CHtml::tag('li', array('class' => 'title'), $title);
36 $list[] = \CHtml::tag('li', array('class' => 'price'), $price);
37 $list[] = \CHtml::tag('li', array('class' => 'description'), $description);
38 foreach ($items as $item) {
39 $list[] = \CHtml::tag('li', array('class' => 'bullet-item'), $item);
40 }
41 if ($button !== null) {
42 $list[] = \CHtml::tag('li', array('class' => 'cta-button'), $button);
43 }
44
45 return \CHtml::tag('ul', array('class' => 'pricing-table'), implode("\n", $list));
46 }
47 }