11 Yii::import(
'zii.widgets.CDetailView');
29 public $type = array(self::TYPE_STRIPED, self::TYPE_CONDENSED);
46 $classes = array(
'table');
48 if (isset($this->type)) {
49 if (is_string($this->type)) {
50 $this->type = explode(
' ', $this->type);
53 $validTypes = array(self::TYPE_STRIPED, self::TYPE_BORDERED, self::TYPE_CONDENSED);
55 if (!empty($this->type)) {
56 foreach ($this->type as
$type) {
57 if (in_array($type, $validTypes)) {
58 $classes[] =
'table-' .
$type;
64 if (!empty($classes)) {
65 $classes = implode(
' ', $classes);
66 if (isset($this->htmlOptions[
'class'])) {
67 $this->htmlOptions[
'class'] .=
' ' . $classes;
69 $this->htmlOptions[
'class'] = $classes;