Overview

Packages

  • application
    • commands
    • components
      • actions
      • filters
      • leftWidget
      • permissions
      • sortableWidget
      • util
      • webupdater
      • x2flow
        • actions
        • triggers
      • X2GridView
      • X2Settings
    • controllers
    • models
      • embedded
    • modules
      • accounts
        • controllers
        • models
      • actions
        • controllers
        • models
      • calendar
        • controllers
        • models
      • charts
        • models
      • contacts
        • controllers
        • models
      • docs
        • components
        • controllers
        • models
      • groups
        • controllers
        • models
      • marketing
        • components
        • controllers
        • models
      • media
        • controllers
        • models
      • mobile
        • components
      • opportunities
        • controllers
        • models
      • products
        • controllers
        • models
      • quotes
        • controllers
        • models
      • services
        • controllers
        • models
      • template
        • models
      • users
        • controllers
        • models
      • workflow
        • controllers
        • models
      • x2Leads
        • controllers
        • models
  • Net
  • None
  • PHP
  • system
    • base
    • caching
      • dependencies
    • collections
    • console
    • db
      • ar
      • schema
        • cubrid
        • mssql
        • mysql
        • oci
        • pgsql
        • sqlite
    • i18n
      • gettext
    • logging
    • test
    • utils
    • validators
    • web
      • actions
      • auth
      • filters
      • form
      • helpers
      • renderers
      • services
      • widgets
        • captcha
        • pagers
  • Text
    • Highlighter
  • zii
    • behaviors
    • widgets
      • grid
      • jui

Classes

  • CJuiAccordion
  • CJuiAutoComplete
  • CJuiButton
  • CJuiDatePicker
  • CJuiDialog
  • CJuiDraggable
  • CJuiDroppable
  • CJuiInputWidget
  • CJuiProgressBar
  • CJuiResizable
  • CJuiSelectable
  • CJuiSlider
  • CJuiSliderInput
  • CJuiSortable
  • CJuiTabs
  • CJuiWidget
  • Overview
  • Package
  • Class
  • Tree

Class CJuiTabs

CJuiTabs displays a tabs widget.

CJuiTabs encapsulates the JUI tabs plugin.

To use this widget, you may insert the following code in a view:

$this->widget('zii.widgets.jui.CJuiTabs',array(
    'tabs'=>array(
        'StaticTab 1'=>'Content for tab 1',
        'StaticTab 2'=>array('content'=>'Content for tab 2', 'id'=>'tab2'),
        // panel 3 contains the content rendered by a partial view
        'AjaxTab'=>array('ajax'=>$ajaxUrl),
    ),
    // additional javascript options for the tabs plugin
    'options'=>array(
        'collapsible'=>true,
    ),
));

By configuring the CJuiWidget::$options property, you may specify the options that need to be passed to the JUI tabs plugin. Please refer to the JUI Tabs API documentation for possible options (name-value pairs) and JUI Tabs page for general description and demo.

Note, in case you're using <base/> HTML tag you may run into the issue when jQuery UI uses altered base URL to load content, but not the base URL content was loaded from. (Developer may expect both behavior in different cases.) For this occasion consider using absolute URL generation as follows:

$this->widget('zii.widgets.jui.CJuiTabs',array(
    'tabs'=>array(
        'Dynamic Tab'=>array('ajax'=>$this->createAbsoluteUrl('tab/content/route')),
    ),
));
CComponent
Extended by CBaseController
Extended by CWidget
Extended by CJuiWidget
Extended by CJuiTabs
Package: zii\widgets\jui
Copyright: 2008-2013 Yii Software LLC
License: http://www.yiiframework.com/license/
Author: Sebastian Thierer <sebathi@gmail.com>
Since: 1.1
Located at x2engine/framework/zii/widgets/jui/CJuiTabs.php
Methods summary
public
# run( )

Run this widget. This method registers necessary javascript and renders the needed HTML code.

Run this widget. This method registers necessary javascript and renders the needed HTML code.

Overrides

CWidget::run()
Methods inherited from CJuiWidget
getScriptFile(), init(), registerCoreScripts(), registerScriptFile(), resolvePackagePath(), setScriptFile()
Methods inherited from CWidget
__construct(), actions(), getController(), getId(), getOwner(), getViewFile(), getViewPath(), render(), setId()
Methods inherited from CBaseController
beginCache(), beginClip(), beginContent(), beginWidget(), createWidget(), endCache(), endClip(), endContent(), endWidget(), renderFile(), renderInternal(), widget()
Methods inherited from CComponent
__call(), __get(), __isset(), __set(), __unset(), asa(), attachBehavior(), attachBehaviors(), attachEventHandler(), canGetProperty(), canSetProperty(), detachBehavior(), detachBehaviors(), detachEventHandler(), disableBehavior(), disableBehaviors(), enableBehavior(), enableBehaviors(), evaluateExpression(), getEventHandlers(), hasEvent(), hasEventHandler(), hasProperty(), raiseEvent()
Properties summary
public array $tabs array()
#

list of tabs (tab title=>tab content). Note that the tab title will not be HTML-encoded. The tab content can be either a string or an array. When it is an array, it can be in one of the following two formats:

array('id'=>'myTabID', 'content'=>'tab content')
array('id'=>'myTabID', 'ajax'=>URL)

where the 'id' element is optional. The second format allows the tab content to be dynamically fetched from the specified URL via AJAX. The URL can be either a string or an array. If an array, it will be normalized into a URL using CHtml::normalizeUrl().

list of tabs (tab title=>tab content). Note that the tab title will not be HTML-encoded. The tab content can be either a string or an array. When it is an array, it can be in one of the following two formats:

array('id'=>'myTabID', 'content'=>'tab content')
array('id'=>'myTabID', 'ajax'=>URL)

where the 'id' element is optional. The second format allows the tab content to be dynamically fetched from the specified URL via AJAX. The URL can be either a string or an array. If an array, it will be normalized into a URL using CHtml::normalizeUrl().

public string $tagName 'div'
#

the name of the container element that contains all panels. Defaults to 'div'.

the name of the container element that contains all panels. Defaults to 'div'.

public string $headerTemplate '<li><a href="{url}" title="{title}">{title}</a></li>'
#

the template that is used to generated every panel title. The token "{title}" in the template will be replaced with the panel title and the token "{url}" will be replaced with "#TabID" or with the url of the ajax request.

the template that is used to generated every panel title. The token "{title}" in the template will be replaced with the panel title and the token "{url}" will be replaced with "#TabID" or with the url of the ajax request.

public string $contentTemplate '<div id="{id}">{content}</div>'
#

the template that is used to generated every tab content. The token "{content}" in the template will be replaced with the panel content and the token "{id}" with the tab ID.

the template that is used to generated every tab content. The token "{content}" in the template will be replaced with the panel content and the token "{id}" with the tab ID.

Properties inherited from CJuiWidget
$_scriptFile, $cssFile, $htmlOptions, $options, $scriptUrl, $theme, $themeUrl
Properties inherited from CWidget
$actionPrefix, $skin
Magic properties inherited from CWidget
$controller, $id, $owner, $viewPath
API documentation generated by ApiGen 2.8.0