TbHtml::modalBody PHP Method

modalBody() public static method

Generates a modal body.
public static modalBody ( string $content, array $htmlOptions = [] ) : string
$content string the body content.
$htmlOptions array additional HTML attributes.
return string the generated body.
    public static function modalBody($content, $htmlOptions = array())
    {
        self::addCssClass('modal-body', $htmlOptions);
        return self::tag('div', $htmlOptions, $content);
    }

Usage Example

Exemplo n.º 1
0
 /**
  * Widget's run method
  */
 public function run()
 {
     if (!isset($this->content)) {
         $this->content = ob_get_clean();
     }
     echo TbHtml::modalBody($this->content);
     echo TbHtml::modalFooter($this->footer);
     echo '</div>' . PHP_EOL;
     echo '</div>' . PHP_EOL;
     echo '</div>' . PHP_EOL;
     $this->renderButton();
     $this->registerClientScript();
 }
TbHtml