Overview

Namespaces

  • Cakestrap
    • View
      • Helper

Classes

  • AlertHelper
  • AssetHelper
  • BadgeHelper
  • Basic
  • ButtonItemsHelper
  • CakestrapHelper
  • CallOutHelper
  • CollapseHelper
  • DropdownHelper
  • ListGroupHelper
  • ModalHelper
  • PanelHelper
  • TabHelper
  • TableHelper
  • Templates
  • WellHelper
  • Overview
  • Namespace
  • Class

Class ModalHelper

Modals are streamlined, but flexible, dialog prompts with the minimum required functionality and smart defaults.

<?php
echo $this->Cakestrap->Modal()->header('Alert')
                              ->options(['show' => true])
                              ->body("This modal  needs your attention, but it's not super important.")
                              ->footer('I am footer.')
                              ->set();
?>
Cake\View\Helper
Extended by Cakestrap\View\Helper\Basic
Extended by Cakestrap\View\Helper\ModalHelper
Namespace: Cakestrap\View\Helper
Package: Cakestrap\View\Helper
Link: http://getbootstrap.com/javascript/#modals
Located at ModalHelper.php
Methods summary
public object
# options( array $options = [] )

This method will merge the default modal helper options and user-provided options.

This method will merge the default modal helper options and user-provided options.

Parameters

$options

Returns

object
$this

Overrides

Cakestrap\View\Helper\Basic::options()
public string
# set( )

Set all the defined values. This will return the final html template.

Set all the defined values. This will return the final html template.

Returns

string
protected
# _addToContainer( )

Add the modal html template to parent container.

Add the modal html template to parent container.

protected
# _setHeader( )

Set the modal header

Set the modal header

protected
# _setBody( )

Set the modal body

Set the modal body

protected
# _setFooter( )

Set the modal footer

Set the modal footer

protected string
# _contents( )

And finally set all the html contents

And finally set all the html contents

Returns

string
$content
Methods inherited from Cakestrap\View\Helper\Basic
__call(), _reset(), assignTemplate(), body()
Magic methods summary
public
# header( string $header )

Parameters

$header

Returns

public
# body( arrayOrstring $body )

Parameters

$body

Returns

public
# footer( string $footer )

Parameters

$footer

Returns

Properties summary
protected string $_container

Contains parent html tag

Contains parent html tag

# []
protected array $_contents

An array of valid content for this helper.

An array of valid content for this helper.

# []
protected array $_options

Default modal options. These options are merged with the user-provided options.

Default modal options. These options are merged with the user-provided options.

-width : You can use either modal-md, modal-lg, modal-sm

-show : Show the modal on page load.

-closable : Enable/disable the close(x) options

# [ 'show' => false, 'width' => 'modal-md', 'id' => '', 'closable'=> false, 'class' => '' ]
protected array $_clone

A variable that cloned the default $_options.

A variable that cloned the default $_options.

#
Properties inherited from Cakestrap\View\Helper\Basic
$_stringTemplate, $_template
API documentation generated by ApiGen