Class CPortlet
CPortlet is the base class for portlet widgets.
A portlet displays a fragment of content, usually in terms of a block on the side bars of a Web page.
To specify the content of the portlet, override the CPortlet::renderContent()
method, or insert the content code between the CBaseController::beginWidget()
and CBaseController::endWidget()
calls. For example,
<?php $this->beginWidget('zii.widgets.CPortlet'); ?> ...insert content here... <?php $this->endWidget(); ?>
A portlet also has an optional CPortlet::$title
. One may also override CPortlet::renderDecoration()
to further customize the decorative display of a portlet (e.g.
adding min/max buttons).
- CComponent
- CBaseController
- CWidget
- CPortlet
Direct known subclasses
LeftWidgetCopyright: 2008-2013 Yii Software LLC
License: http://www.yiiframework.com/license/
Author: Qiang Xue <qiang.xue@gmail.com>
Since: 1.1
Located at x2engine/framework/zii/widgets/CPortlet.php
public
|
|
public
|
|
protected
|
#
renderDecoration( )
Renders the decoration for the portlet. The default implementation will render the title if it is set. |
protected
|
#
renderContent( )
Renders the content of the portlet. Child classes should override this method to render the actual content. |
__construct(),
actions(),
getController(),
getId(),
getOwner(),
getViewFile(),
getViewPath(),
render(),
setId()
|
beginCache(),
beginClip(),
beginContent(),
beginWidget(),
createWidget(),
endCache(),
endClip(),
endContent(),
endWidget(),
renderFile(),
renderInternal(),
widget()
|
public
string
|
$tagName | 'div' |
#
the tag name for the portlet container tag. Defaults to 'div'. |
public
array
|
$htmlOptions | array('class'=>'portlet') |
#
the HTML attributes for the portlet container tag. |
public
string
|
$title |
|
#
the title of the portlet. Defaults to null. When this is not set, Decoration will not be displayed. Note that the title will not be HTML-encoded when rendering. |
public
string
|
$decorationCssClass | 'portlet-decoration' |
#
the CSS class for the decoration container tag. Defaults to 'portlet-decoration'. |
public
string
|
$titleCssClass | 'portlet-title' |
#
the CSS class for the portlet title tag. Defaults to 'portlet-title'. |
public
string
|
$contentCssClass | 'portlet-content' |
#
the CSS class for the content container tag. Defaults to 'portlet-content'. |
public
boolean
|
$hideOnEmpty | true |
#
whether to hide the portlet when the body content is empty. Defaults to true. |
$actionPrefix,
$skin
|
$controller,
$id,
$owner,
$viewPath
|