YiiFoundation
  • Namespace
  • Class
  • Tree

Namespaces

  • foundation
    • enum
    • exception
    • helpers
    • widgets
      • base
  • PHP

Classes

  • Alert
  • ArrayHelper
  • Button
  • Foundation
  • Html
  • Icon
  • Nav
  • Panel
  • Pricing
  • Progress
  • Typo
 1 <?php
 2 /**
 3  * @copyright Copyright &copy; 2amigOS! Consulting Group 2013-
 4  * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
 5  * @package foundation.components
 6  * @version 1.0.0
 7  */
 8 
 9 namespace foundation\helpers;
10 
11 use foundation\enum\Enum;
12 
13 /**
14  * Pricing renders foundation pricing tables
15  *
16  * @see http://foundation.zurb.com/docs/components/pricing-tables.html
17  *
18  * @author Antonio Ramirez <amigo.cobos@gmail.com>
19  * @package foundation\helpers
20  */
21 class Pricing
22 {
23     /**
24      *
25      * @param $title
26      * @param $price
27      * @param $description
28      * @param array $items
29      * @param string/null $button
30      * @return string
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 }
YiiFoundation API documentation generated by ApiGen 2.8.0