Class EditableDetailView
CDetailView displays the detail of a single data model.
CDetailView is best used for displaying a model in a regular format (e.g. each model attribute is displayed as a row in a table.) The model can be either an instance of CModel or an associative array.
CDetailView uses the CDetailView::$attributes
property to determines which model
attributes should be displayed and how they should be formatted.
A typical usage of CDetailView is as follows:
$this->widget('zii.widgets.CDetailView', array( 'data'=>$model, 'attributes'=>array( 'title', // title attribute (in plain text) 'owner.name', // an attribute of the related object "owner" 'description:html', // description attribute in HTML array( // related city displayed as a link 'label'=>'City', 'type'=>'raw', 'value'=>CHtml::link(CHtml::encode($model->city->name), array('city/view','id'=>$model->city->id)), ), ), ));
- CComponent
-
CBaseController
-
CWidget
-
CDetailView
-
EditableDetailView
Copyright: Copyright © Vitaliy Potapov 2012
License: New BSD License
Author: Qiang Xue <qiang.xue@gmail.com>
Version: $Id$
Since: 1.1
Located at vitalets/yii-bootstrap-editable/EditableDetailView.php
Methods summary
public
|
|
protected
|
#
renderItem( array $options, string $templateData )
This method is used by run() to render item row |
Methods inherited from CDetailView
getFormatter()
,
run()
,
setFormatter()
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()
Magic methods summary
Properties summary
public
string
|
$url | |
public
array
|
$htmlOptions |
#
the HTML options used for |
Properties inherited from CDetailView
$attributes
,
$baseScriptUrl
,
$cssFile
,
$data
,
$itemCssClass
,
$itemTemplate
,
$nullDisplay
,
$tagName
Properties inherited from CWidget
$actionPrefix
,
$skin
Magic properties inherited from CDetailView
$formatter
Magic properties inherited from CWidget
$controller
,
$id
,
$owner
,
$viewPath