public function init()
{
if (!isset($this->htmlOptions['id'])) {
$this->htmlOptions['id'] = $this->getId();
}
if ($this->autoOpen === false && !isset($this->options['show'])) {
$this->options['show'] = false;
}
$classes = array('modal hide');
if ($this->fade === true) {
$classes[] = 'fade';
}
if (!empty($classes)) {
$classes = implode(' ', $classes);
if (isset($this->htmlOptions['class'])) {
$this->htmlOptions['class'] .= ' ' . $classes;
} else {
$this->htmlOptions['class'] = $classes;
}
}
echo CHtml::openTag('div', $this->htmlOptions);
}