PHP 클래스 macgyer\yii2materializecss\widgets\Modal

The following example will show the content enclosed between the \yii\base\Widget::begin()-detail) and \yii\base\Widget::end()-detail) calls within the modal window: php Modal::begin([ 'closeButton' => [ 'label' => 'Close modal', 'tag' => 'span' ], 'toggleButton' => [ 'label' => 'Open modal' ], 'modalType' => Modal::TYPE_BOTTOM_SHEET, ]); echo 'Say hello...'; Modal::end();
또한 보기: http://materializecss.com/modals.html
저자: Christoph Erdmann ([email protected])
상속: extends macgyer\yii2materializecss\lib\BaseWidget
파일 보기 프로젝트 열기: macgyer/yii2-materializecss

공개 프로퍼티들

프로퍼티 타입 설명
$closeButton the options for rendering the close button tag. The close button is displayed in the header of the modal window. Clicking on the button will hide the modal window. If this is false, no close button will be rendered. The following special options are supported: - tag: string, the tag name of the button. Defaults to 'button'. - label: string, the label of the button. Defaults to '×'. The rest of the options will be rendered as the HTML attributes of the button tag. Please refer to the Modal plugin help for the supported HTML attributes.
$closeButtonPosition the position of the close button. The following options are supported: - beforeContent, right before the content, inside the container ".modal-content" - afterContent, right after the content, inside the container ".modal-content" - beforeFooter, right before the footer content, inside the container ".modal-footer" - afterFooter, right before the footer content, inside the container ".modal-footer" - precedeContainer, directly before the container ".modal-content" opens - succeedContainer, directly after the container ".modal-content" closes Defaults to "beforeContent".
$footer the content of the footer.
$footerOptions the optional HTML attributes for the footer container.
$modalType the different modal types. The following options are supported - lean (default) - fixedFooter - bottomSheet
$options the HTML attributes for the widget container tag. These special options are recognized: - tag: string, defaults to "div", the name of the container tag.
$toggleButton the options for rendering the toggle button tag. The toggle button is used to toggle the visibility of the modal window. If this property is false, no toggle button will be rendered. The following special options are supported: - tag: string, the tag name of the button. Defaults to 'button'. - label: string, the label of the button. Defaults to 'Show'. The rest of the options will be rendered as the HTML attributes of the button tag. Please refer to the Modal plugin help for the supported HTML attributes.

공개 메소드들

메소드 설명
init ( ) Initializes the widget.
run ( ) : string Executes the widget.

보호된 메소드들

메소드 설명
initDefaults ( ) Set inital default options.
renderCloseButton ( ) : null | string Renders the close button.
renderFooter ( ) : string Renders the Modal footer.
renderToggleButton ( ) : null | string Renders the Modal's toggle button.

메소드 상세

init() 공개 메소드

Initializes the widget.
public init ( )

initDefaults() 보호된 메소드

Set inital default options.
protected initDefaults ( )

renderCloseButton() 보호된 메소드

Renders the close button.
또한 보기: closeButton
protected renderCloseButton ( ) : null | string
리턴 null | string the rendered result.

renderFooter() 보호된 메소드

Renders the Modal footer.
protected renderFooter ( ) : string
리턴 string the rendered markup of the footer.

renderToggleButton() 보호된 메소드

Renders the Modal's toggle button.
또한 보기: toggleButton
protected renderToggleButton ( ) : null | string
리턴 null | string the rendered result.

run() 공개 메소드

Executes the widget.
public run ( ) : string
리턴 string the result of widget execution to be outputted.

프로퍼티 상세

$closeButton 공개적으로 프로퍼티

the options for rendering the close button tag. The close button is displayed in the header of the modal window. Clicking on the button will hide the modal window. If this is false, no close button will be rendered. The following special options are supported: - tag: string, the tag name of the button. Defaults to 'button'. - label: string, the label of the button. Defaults to '×'. The rest of the options will be rendered as the HTML attributes of the button tag. Please refer to the Modal plugin help for the supported HTML attributes.
또한 보기: [\yii\helpers\Html::renderTagAttributes()](http://www.yiiframework.com/doc-2.0/yii-helpers-basehtml.html#renderTagAttributes()-detail) for details on how attributes are being rendered.
public $closeButton

$closeButtonPosition 공개적으로 프로퍼티

the position of the close button. The following options are supported: - beforeContent, right before the content, inside the container ".modal-content" - afterContent, right after the content, inside the container ".modal-content" - beforeFooter, right before the footer content, inside the container ".modal-footer" - afterFooter, right before the footer content, inside the container ".modal-footer" - precedeContainer, directly before the container ".modal-content" opens - succeedContainer, directly after the container ".modal-content" closes Defaults to "beforeContent".
public $closeButtonPosition

$footerOptions 공개적으로 프로퍼티

the optional HTML attributes for the footer container.
또한 보기: [\yii\helpers\Html::renderTagAttributes()](http://www.yiiframework.com/doc-2.0/yii-helpers-basehtml.html#renderTagAttributes()-detail) for details on how attributes are being rendered.
public $footerOptions

$modalType 공개적으로 프로퍼티

the different modal types. The following options are supported - lean (default) - fixedFooter - bottomSheet
또한 보기: http://materializecss.com/modals.html
public $modalType

$options 공개적으로 프로퍼티

the HTML attributes for the widget container tag. These special options are recognized: - tag: string, defaults to "div", the name of the container tag.
또한 보기: [\yii\helpers\Html::renderTagAttributes()](http://www.yiiframework.com/doc-2.0/yii-helpers-basehtml.html#renderTagAttributes()-detail) for details on how attributes are being rendered.
public $options

$toggleButton 공개적으로 프로퍼티

the options for rendering the toggle button tag. The toggle button is used to toggle the visibility of the modal window. If this property is false, no toggle button will be rendered. The following special options are supported: - tag: string, the tag name of the button. Defaults to 'button'. - label: string, the label of the button. Defaults to 'Show'. The rest of the options will be rendered as the HTML attributes of the button tag. Please refer to the Modal plugin help for the supported HTML attributes.
또한 보기: [\yii\helpers\Html::renderTagAttributes()](http://www.yiiframework.com/doc-2.0/yii-helpers-basehtml.html#renderTagAttributes()-detail) for details on how attributes are being rendered.
public $toggleButton