Dotclear 2.24
Loading...
Searching...
No Matches
dcAdminNotices Class Reference

Static Public Member Functions

static getNotices ()
 
static addNotice (string $type, string $message, array $options=[])
 
static addMessageNotice (string $message, array $options=[])
 
static addSuccessNotice (string $message, array $options=[])
 
static addWarningNotice (string $message, array $options=[])
 
static addErrorNotice (string $message, array $options=[])
 
static message (string $msg, bool $timestamp=true, bool $div=false, bool $echo=true, ?string $class=null)
 
static success (string $msg, bool $timestamp=true, bool $div=false, bool $echo=true)
 
static warning (string $msg, bool $timestamp=true, bool $div=false, bool $echo=true)
 
static error (string $msg, bool $timestamp=true, bool $div=false, bool $echo=true)
 

Data Fields

const NOTICE_SUCCESS = 'success'
 
const NOTICE_WARNING = 'warning'
 
const NOTICE_ERROR = 'error'
 
const NOTICE_MESSAGE = 'message'
 
const NOTICE_STATIC = 'static'
 

Member Function Documentation

◆ getNotices()

static getNotices ( )
static

Gets the HTML code of notices.

Returns
string The notices.

References dcCore\app(), DC_VERSION, and NOTICE_STATIC.

Referenced by dcPage\notices(), dcPage\open(), and dcPage\openPopup().

◆ addNotice()

static addNotice ( string  $type,
string  $message,
array  $options = [] 
)
static

Adds a notice.

Parameters
string$typeThe type
string$messageThe message
array$optionsThe options

References $message, dcCore\app(), and dt\setTZ().

Referenced by addErrorNotice(), dcPage\addErrorNotice(), addMessageNotice(), dcPage\addMessageNotice(), addSuccessNotice(), dcPage\addSuccessNotice(), addWarningNotice(), and dcPage\addWarningNotice().

◆ addMessageNotice()

static addMessageNotice ( string  $message,
array  $options = [] 
)
static

Adds a message (informational) notice.

Parameters
string$messageThe message
array$optionsThe options

References $message, and addNotice().

◆ addSuccessNotice()

static addSuccessNotice ( string  $message,
array  $options = [] 
)
static

Adds a success notice.

Parameters
string$messageThe message
array$optionsThe options

References $message, and addNotice().

◆ addWarningNotice()

static addWarningNotice ( string  $message,
array  $options = [] 
)
static

Adds a warning notice.

Parameters
string$messageThe message
array$optionsThe options

References $message, and addNotice().

◆ addErrorNotice()

static addErrorNotice ( string  $message,
array  $options = [] 
)
static

Adds an error notice.

Parameters
string$messageThe message
array$optionsThe options

References $message, and addNotice().

◆ message()

static message ( string  $msg,
bool  $timestamp = true,
bool  $div = false,
bool  $echo = true,
?string  $class = null 
)
static

Direct messages, usually immediately displayed

Parameters
string$msgThe message
bool$timestampWith the timestamp
bool$divInside a div (else in a p)
bool$echoDisplay the message?
null | string$classThe class of block (div/p)
Returns
string

References dcCore\app(), dt\iso8601(), NOTICE_MESSAGE, and dt\str().

Referenced by error(), dcPage\message(), success(), and warning().

◆ success()

static success ( string  $msg,
bool  $timestamp = true,
bool  $div = false,
bool  $echo = true 
)
static

Display a success message

Parameters
string$msgThe message
bool$timestampWith the timestamp
bool$divInside a div (else in a p)
bool$echoDisplay the message?
Returns
string

References message().

Referenced by dcPage\success().

◆ warning()

static warning ( string  $msg,
bool  $timestamp = true,
bool  $div = false,
bool  $echo = true 
)
static

Display a warning message

Parameters
string$msgThe message
bool$timestampWith the timestamp
bool$divInside a div (else in a p)
bool$echoDisplay the message?
Returns
string

References message().

Referenced by adminBlogDel\render(), and dcPage\warning().

◆ error()

static error ( string  $msg,
bool  $timestamp = true,
bool  $div = false,
bool  $echo = true 
)
static

Display an error message

Parameters
string$msgThe message
bool$timestampWith the timestamp
bool$divInside a div (else in a p)
bool$echoDisplay the message?
Returns
string

References message().

Referenced by dcPage\error(), and dcError\toHTML().

Field Documentation

◆ NOTICE_SUCCESS

const NOTICE_SUCCESS = 'success'

Referenced by dcPage\addSuccessNotice().

◆ NOTICE_WARNING

const NOTICE_WARNING = 'warning'

Referenced by dcPage\addWarningNotice().

◆ NOTICE_ERROR

const NOTICE_ERROR = 'error'

Referenced by dcPage\addErrorNotice().

◆ NOTICE_MESSAGE

const NOTICE_MESSAGE = 'message'

Referenced by dcPage\addMessageNotice(), and message().

◆ NOTICE_STATIC

const NOTICE_STATIC = 'static'

Referenced by getNotices().


The documentation for this class was generated from the following file: