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  * Panel renders foundation panels
15  *
16  * @see http://foundation.zurb.com/docs/components/panels.html
17  *
18  * @author Antonio Ramirez <amigo.cobos@gmail.com>
19  * @package foundation\helpers
20  */
21 class Panel
22 {
23     /**
24      * Generates a panel
25      *
26      * @param string $content the content to display
27      * @param array $htmlOptions the HTML attributes of the panel
28      * @return string
29      * @see http://foundation.zurb.com/docs/components/panels.html
30      */
31     public static function panel($content, $htmlOptions = array())
32     {
33         ArrayHelper::addValue('class', Enum::PANEL, $htmlOptions);
34         return \CHtml::tag('div', $htmlOptions, $content);
35     }
36 
37     /**
38      * Generates a callout panel
39      *
40      * @param string $content the content to display
41      * @param array $htmlOptions the HTML attributes of the panel
42      * @return string
43      */
44     public static function callout($content, $htmlOptions = array())
45     {
46         ArrayHelper::addValue('class', Enum::PANEL_CALLOUT, $htmlOptions);
47         return static::panel($content, $htmlOptions);
48     }
49 }
YiiFoundation API documentation generated by ApiGen 2.8.0