TbHtml::closeButton PHP Method

closeButton() public static method

Generates a close button.
public static closeButton ( string $label = self::CLOSE_TEXT, array $htmlOptions = [] ) : string
$label string the button label text.
$htmlOptions array the HTML options for the button.
return string the generated button.
    public static function closeButton($label = self::CLOSE_TEXT, $htmlOptions = array())
    {
        return self::close('button', $label, $htmlOptions);
    }

Usage Example

Example #1
0
 /**
  * Renders the header HTML markup of the modal
  */
 public function renderModalHeader()
 {
     echo '<div class="modal-header">' . PHP_EOL;
     if ($this->closeText) {
         echo TbHtml::closeButton($this->closeText, array('data-dismiss' => 'modal'));
     }
     echo TbHtml::tag('h3', array(), $this->header);
     echo '</div>' . PHP_EOL;
 }
All Usage Examples Of TbHtml::closeButton
TbHtml