YiiFoundation
  • Namespace
  • Class
  • Tree

Namespaces

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

Classes

  • Alert
  • Breadcrumbs
  • Clearing
  • Dropdown
  • FlexVideo
  • Interchange
  • JoyRide
  • Magellan
  • Orbit
  • Pager
  • Reveal
  • Section
  • SwitchButton
  • Tooltip
  • TopBar

Class Section

Section renders Foundation sections, which are similar to tabs as a way to selectively show a single panel of content at a time. Sections replace Accordion, Tabs, Vertical Nav & Horizontal Nav.

For example:

echo Tabs::widget(array(
    'items' => array(
        array(
            'label' => 'One',
            'content' => 'Anim pariatur cliche...',
            'active' => true
        ),
        array(
            'label' => 'Two',
            'content' => 'Anim pariatur cliche...',
            'options' => array('id' => 'myveryownID'),
        ),
    ),
));
CWidget
Extended by foundation\widgets\base\Widget
Extended by foundation\widgets\Section
Namespace: foundation\widgets
Package: foundation\helpers
Author: Antonio Ramirez <amigo.cobos@gmail.com>
Located at widgets/Section.php

Methods summary

public
# init( )

Initilizes the widget

Initilizes the widget

Overrides

foundation\widgets\base\Widget::init
public
# run( )

Renders the widget

Renders the widget

public string
# renderSection( )

Renders the section

Renders the section

Returns

string
the rendering result
public string
# renderItem( array $item )

Renders a section item

Renders a section item

Parameters

$item
array
$item the section item

Returns

string
the section result
public
# registerClientScript( )

Registers the client options to initialize the plugin -if set.

Registers the client options to initialize the plugin -if set.

Methods inherited from foundation\widgets\base\Widget

display(), registerAssets(), registerEvents(), registerPlugin()

Magic methods summary

Properties summary

public array $items
#

list of tabs in the tabs widget. Each array element represents a single tab with the following structure:

  • label: string, required, the tab header label.
  • headerOptions: array, optional, the HTML attributes of the tab header.
  • content: array, required if items is not set. The content (HTML) of the section pane.
  • options: array, optional, the HTML attributes of the content pane container.
  • active: boolean, optional, whether the item section header and pane should be visible or not.

list of tabs in the tabs widget. Each array element represents a single tab with the following structure:

  • label: string, required, the tab header label.
  • headerOptions: array, optional, the HTML attributes of the tab header.
  • content: array, required if items is not set. The content (HTML) of the section pane.
  • options: array, optional, the HTML attributes of the content pane container.
  • active: boolean, optional, whether the item section header and pane should be visible or not.
public string $style
#

style of the sections. Defaults to 'auto', which means that will switch between tabs and accordion based on the resolution of the device.

style of the sections. Defaults to 'auto', which means that will switch between tabs and accordion based on the resolution of the device.

public array $pluginOptions
#

the plugin options. The following is the list of supported options and their default values:

´´´php array(
'deep_linking' => 'false',
'one_up' => 'true',
'rtl' => 'false',
'callback' => 'js:function(){}', ) ´´´

the plugin options. The following is the list of supported options and their default values:

´´´php array( 'deep_linking' => 'false', 'one_up' => 'true', 'rtl' => 'false', 'callback' => 'js:function(){}', ) ´´´

Properties inherited from foundation\widgets\base\Widget

$assets, $htmlOptions, $links

YiiFoundation API documentation generated by ApiGen 2.8.0