widgets\FragmentCache $cache

$cache public property The cache object or the application component ID of the cache object. After the FragmentCache object is created, if you want to change this property, you should only assign it with a cache object. Starting from version 2.0.2, this can also be a configuration array for creating the object. public yii\caching\Cache|array|string $cache = 'cache'

widgets\DetailView run()

run() public method Renders the detail view. This is the main entry of the whole detail view rendering. public void run ( )

widgets\DetailView renderAttribute()

renderAttribute() protected method Renders a single attribute. protected string renderAttribute ( $attribute, $index )$attribute array The specification of the attribute to be rendered. $index integer The zero-based index of the attribute in the $attributes array return string The rendering result

widgets\DetailView normalizeAttributes()

normalizeAttributes() protected method Normalizes the attribute specifications. protected void normalizeAttributes ( )throws yii\base\InvalidConfigException

widgets\DetailView init()

init() public method Initializes the detail view. This method will initialize required property values. public void init ( )

widgets\DetailView $template

$template public property The template used to render a single attribute. If a string, the token {label} and {value} will be replaced with the label and the value of the corresponding attribute. If a callback (e.g. an anonymous function), the signature must be as follows: function ($attribute, $index, $widget) where $attribute refer to the specification of the attribute being rendered, $index is the zero-based index of the attribute in the $attributes array, and $widget refers to this widg

widgets\DetailView $options

$options public property The HTML attributes for the container tag of this widget. The tag option specifies what container tag should be used. It defaults to table if not set. See also yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered. public array $options = ['class' => 'table table-striped table-bordered detail-view']

widgets\DetailView $model

$model public property The data model whose details are to be displayed. This can be a yii\base\Model instance, an associative array, an object that implements yii\base\Arrayable interface or simply an object with defined public accessible non-static properties. public array|object $model = null

widgets\DetailView $formatter

$formatter public property The formatter used to format model attribute values into displayable texts. This can be either an instance of yii\i18n\Formatter or an configuration array for creating the yii\i18n\Formatter instance. If this property is not set, the formatter application component will be used. public array|yii\i18n\Formatter $formatter = null

widgets\DetailView $attributes

$attributes public property A list of attributes to be displayed in the detail view. Each array element represents the specification for displaying one particular attribute. An attribute can be specified as a string in the format of attribute, attribute:format or attribute:format:label, where attribute refers to the attribute name, and format represents the format of the attribute. The format is passed to the yii\i18n\Formatter::format() method to format an attribute value into a displayabl