PHP 클래스 WPDKUIAlert

### Create an Alert To create and display an alert just coding: $alert = new WPDKUIAlert( 'my-alert', 'Hello World!' ); $alert->display(); OR class myAlert extends WPDKUIAlert { Internal construct public function __construct() { parent::__construct( $id, false, $type, $title ); } Override content public function content() { echo 'Hello...'; } }
부터: 1.4.21
저자: =undo= ([email protected])
상속: extends WPDKHTMLTag
파일 보기 프로젝트 열기: wpxtreme/wpdk 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$block boolean Set TRUE for alert-block class style
$content string The HTML content of alert.
$dismissButton boolean Set TRUE to display dismiss [x] button. Default TRUE.
$dismissButtonGlyph string Used to get/set the glyph icon used like dismiss button.
$dismissPermanent boolean If TRUE this alert is permanent dismiss by a logged in user
$dismissToolTip string This is the tooltip (for more detail) display on dismiss button.
$dismiss_button_glyph string Glyph used like dismiss button
$dismissable boolean Add alert-dismissable class in HTML markup.
$permanent_dismiss boolean If TRUE this alert is permanet dismiss by a logged in user
$title string Title of the alter.
$type string The alert type change the left border color. Use the constants in WPDKUIAlertType class.
$wpautop boolean If TRUE the WordPress wpautop() on content.

보호된 프로퍼티들

프로퍼티 타입 설명
$dismissed array Internal use only.

공개 메소드들

메소드 설명
__construct ( string $id = false, string $content = '', string $type = WPDKUIAlertType::INFORMATION, string $title = '' ) : WPDKUIAlert Create an instance of WPDKUIAlert class.
alert ( $echo = true )
content ( ) : string Content
html ( ) : string Return the HTML markup for alert
title ( ) : string Title
toControl ( ) : array Return an array item description in Control Layout Array format

비공개 메소드들

메소드 설명
_content ( ) : string Return a formatted content
_dismissButton ( ) : string Return the HTML markup button for dismiss
_title ( ) : string Return the title
alert_block ( ) : string Return alert-block class style

메소드 상세

__construct() 공개 메소드

Create an instance of WPDKUIAlert class.
public __construct ( string $id = false, string $content = '', string $type = WPDKUIAlertType::INFORMATION, string $title = '' ) : WPDKUIAlert
$id string Optional. This alert id. If FALSE a unique id is create in order to avoid potential alert display missing.
$content string Optional. An HTML content for this alert
$type string Optional. See WPDKUIAlertType. Default WPDKUIAlertType::INFORMATION
$title string Optional. Title of alert
리턴 WPDKUIAlert

alert() 공개 메소드

사용 중단: Use display() or html() instead
public alert ( $echo = true )

content() 공개 메소드

Content
public content ( ) : string
리턴 string

html() 공개 메소드

Return the HTML markup for alert
public html ( ) : string
리턴 string

title() 공개 메소드

Title
public title ( ) : string
리턴 string

toControl() 공개 메소드

Return an array item description in Control Layout Array format
부터: 1.0.0
public toControl ( ) : array
리턴 array

프로퍼티 상세

$block 공개적으로 프로퍼티

Set TRUE for alert-block class style
사용 중단: Since WPDK 1.3.1 and Bootstrap 3.0.0
public bool $block
리턴 boolean

$content 공개적으로 프로퍼티

The HTML content of alert.
public string $content
리턴 string

$dismissButton 공개적으로 프로퍼티

Set TRUE to display dismiss [x] button. Default TRUE.
public bool $dismissButton
리턴 boolean

$dismissButtonGlyph 공개적으로 프로퍼티

Used to get/set the glyph icon used like dismiss button.
부터: 1.5.6
public string $dismissButtonGlyph
리턴 string

$dismissPermanent 공개적으로 프로퍼티

If TRUE this alert is permanent dismiss by a logged in user
부터: 1.5.6
public bool $dismissPermanent
리턴 boolean

$dismissToolTip 공개적으로 프로퍼티

This is the tooltip (for more detail) display on dismiss button.
부터: 1.4.8
public string $dismissToolTip
리턴 string

$dismiss_button_glyph 공개적으로 프로퍼티

Glyph used like dismiss button
사용 중단: since 1.5.6 Use $dismissButtonGlyph instead
public string $dismiss_button_glyph
리턴 string

$dismissable 공개적으로 프로퍼티

Add alert-dismissable class in HTML markup.
부터: 1.3.1
public bool $dismissable
리턴 boolean

$dismissed 보호되어 있는 프로퍼티

Internal use only.
protected array $dismissed
리턴 array

$permanent_dismiss 공개적으로 프로퍼티

If TRUE this alert is permanet dismiss by a logged in user
사용 중단: 1.5.6 Use $dismissPermanent
부터: 1.4.21
public bool $permanent_dismiss
리턴 boolean

$title 공개적으로 프로퍼티

Title of the alter.
public string $title
리턴 string

$type 공개적으로 프로퍼티

The alert type change the left border color. Use the constants in WPDKUIAlertType class.
public string $type
리턴 string

$wpautop 공개적으로 프로퍼티

If TRUE the WordPress wpautop() on content.
부터: 1.6.1
public bool $wpautop
리턴 boolean