PHP Class Bootstrap\View\Helper\BootstrapModalHelper

Inheritance: extends Cake\View\Helper, use trait BootstrapTrait
Show file Open project: holt59/cakephp3-bootstrap3-helpers

Public Properties

Property Type Description
$helpers

Protected Properties

Property Type Description
$_current
$_currentId

Public Methods

Method Description
body ( array | string $info = null, array $options = [] ) Create / Start the body. If $info is not null, it is used as the body content, otherwize start the body div.
create ( array | string $title = null, array $options = [] ) Create a Twitter Bootstrap like modal.
end ( array | null $buttons = NULL, array $options = [] ) End a modal. If $buttons is not null, the ModalHelper::footer functions is called with $buttons and $options arguments.
footer ( array | string $buttons = null, array $options = [] ) Create / Start the footer. If $buttons is specified as an associative arrays or as null, start the footer, otherwize create the footer with the specified buttons.
header ( array | string $info = null, array $options = [] ) Create / Start the header. If $info is specified as a string, create and return the whole header, otherwize only open the header.

Protected Methods

Method Description
_cleanCurrent ( )
_createBody ( $text = null, $options = [] )
_createFooter ( $buttons = null, $options = [] )
_createHeader ( $title = null, $options = [] )
_part ( $part, $content = null, $options = [] )

Method Details

_cleanCurrent() protected method

protected _cleanCurrent ( )

_createBody() protected method

protected _createBody ( $text = null, $options = [] )

_createFooter() protected method

protected _createFooter ( $buttons = null, $options = [] )

_createHeader() protected method

protected _createHeader ( $title = null, $options = [] )

_part() protected method

protected _part ( $part, $content = null, $options = [] )

body() public method

Create / Start the body. If $info is not null, it is used as the body content, otherwize start the body div.
public body ( array | string $info = null, array $options = [] )
$info array | string If string, use as the body content, otherwize works as $options.
$options array Options for the footer div.

create() public method

Create a Twitter Bootstrap like modal.
public create ( array | string $title = null, array $options = [] )
$title array | string If array, works as $options, otherwize used as the modal title.
$options array Options for the main div of the modal. Extra options (useless if $title not specified) : - close: Add close buttons to header (default true) - no-body: Do not open the body after the create (default false) - size: Modal size (small, large or custom classes)

end() public method

End a modal. If $buttons is not null, the ModalHelper::footer functions is called with $buttons and $options arguments.
public end ( array | null $buttons = NULL, array $options = [] )
$buttons array | null
$options array

header() public method

Create / Start the header. If $info is specified as a string, create and return the whole header, otherwize only open the header.
public header ( array | string $info = null, array $options = [] )
$info array | string If string, use as the modal title, otherwize works as $options.
$options array Options for the header div. Special option (if $info is string): - close: Add the 'close' button in the header (default true).

Property Details

$_current protected property

protected $_current

$_currentId protected property

protected $_currentId

$helpers public property

public $helpers