PHP 클래스 UxWeb\SweetAlert\SweetAlertNotifier

파일 보기 프로젝트 열기: uxweb/sweet-alert 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$config array Configuration options.
$session UxWeb\SweetAlert\SessionStore

공개 메소드들

메소드 설명
__construct ( UxWeb\SweetAlert\SessionStore $session ) Create a new SweetAlertNotifier instance.
autoclose ( integer $milliseconds = null ) : SweetAlertNotifier Set the duration for this alert until it autocloses.
basic ( string $text, string $title ) : SweetAlertNotifier Display a not typed alert message with a text and a title.
cancelButton ( $buttonText = 'Cancel' )
confirmButton ( string $buttonText = 'OK' ) : SweetAlertNotifier Add a confirmation button to the alert.
error ( string $text, string $title = '' ) : SweetAlertNotifier Display an error typed alert message with a text and an optional title.
getConfig ( ) : array Return the current alert configuration.
getJsonConfig ( ) : string Return the current alert configuration as Json.
html ( ) : SweetAlertNotifier Make Message HTML view.
info ( string $text, string $title = '' ) : SweetAlertNotifier Display an info typed alert message with a text and an optional title.
message ( string $text, string $title = '', string $type = null ) : SweetAlertNotifier Display an alert message with a text and an optional title.
persistent ( string $buttonText = 'OK' ) : SweetAlertNotifier Make this alert persistent with a confirmation button.
success ( string $text, string $title = '' ) : SweetAlertNotifier Display a success typed alert message with a text and an optional title.
warning ( string $text, string $title = '' ) : SweetAlertNotifier Display a warning typed alert message with a text and an optional title.

보호된 메소드들

메소드 설명
buildJsonConfig ( ) : string Build the configuration as Json.
flashConfig ( ) : void Flash the current alert configuration to the session store.
hasTitle ( ) : boolean Determine if the title is set.
removeTimer ( ) : void Remove the timer config option.
setDefaultConfig ( ) : void Sets all default config options for an alert.
switchTitle ( $config ) : void Switch the text message to the title key.

메소드 상세

__construct() 공개 메소드

Create a new SweetAlertNotifier instance.
public __construct ( UxWeb\SweetAlert\SessionStore $session )
$session UxWeb\SweetAlert\SessionStore

autoclose() 공개 메소드

Set the duration for this alert until it autocloses.
public autoclose ( integer $milliseconds = null ) : SweetAlertNotifier
$milliseconds integer
리턴 SweetAlertNotifier $this

basic() 공개 메소드

Display a not typed alert message with a text and a title.
public basic ( string $text, string $title ) : SweetAlertNotifier
$text string
$title string
리턴 SweetAlertNotifier $this

buildJsonConfig() 보호된 메소드

Build the configuration as Json.
protected buildJsonConfig ( ) : string
리턴 string

cancelButton() 공개 메소드

public cancelButton ( $buttonText = 'Cancel' )

confirmButton() 공개 메소드

Add a confirmation button to the alert.
public confirmButton ( string $buttonText = 'OK' ) : SweetAlertNotifier
$buttonText string
리턴 SweetAlertNotifier $this

error() 공개 메소드

Display an error typed alert message with a text and an optional title.
public error ( string $text, string $title = '' ) : SweetAlertNotifier
$text string
$title string
리턴 SweetAlertNotifier $this

flashConfig() 보호된 메소드

Flash the current alert configuration to the session store.
protected flashConfig ( ) : void
리턴 void

getConfig() 공개 메소드

Return the current alert configuration.
public getConfig ( ) : array
리턴 array

getJsonConfig() 공개 메소드

Return the current alert configuration as Json.
public getJsonConfig ( ) : string
리턴 string

hasTitle() 보호된 메소드

Determine if the title is set.
protected hasTitle ( ) : boolean
리턴 boolean

html() 공개 메소드

Make Message HTML view.
public html ( ) : SweetAlertNotifier
리턴 SweetAlertNotifier $this

info() 공개 메소드

Display an info typed alert message with a text and an optional title.
public info ( string $text, string $title = '' ) : SweetAlertNotifier
$text string
$title string
리턴 SweetAlertNotifier $this

message() 공개 메소드

By default the alert is not typed.
public message ( string $text, string $title = '', string $type = null ) : SweetAlertNotifier
$text string
$title string
$type string
리턴 SweetAlertNotifier $this

persistent() 공개 메소드

Make this alert persistent with a confirmation button.
public persistent ( string $buttonText = 'OK' ) : SweetAlertNotifier
$buttonText string
리턴 SweetAlertNotifier $this

removeTimer() 보호된 메소드

Remove the timer config option.
protected removeTimer ( ) : void
리턴 void

setDefaultConfig() 보호된 메소드

Sets all default config options for an alert.
protected setDefaultConfig ( ) : void
리턴 void

success() 공개 메소드

Display a success typed alert message with a text and an optional title.
public success ( string $text, string $title = '' ) : SweetAlertNotifier
$text string
$title string
리턴 SweetAlertNotifier $this

switchTitle() 보호된 메소드

Switch the text message to the title key.
protected switchTitle ( $config ) : void
리턴 void

warning() 공개 메소드

Display a warning typed alert message with a text and an optional title.
public warning ( string $text, string $title = '' ) : SweetAlertNotifier
$text string
$title string
리턴 SweetAlertNotifier $this

프로퍼티 상세

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

Configuration options.
protected array $config
리턴 array

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

protected SessionStore,UxWeb\SweetAlert $session
리턴 UxWeb\SweetAlert\SessionStore