Cutelyst  1.5.0
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
Cutelyst::StatusMessage Class Reference
Inheritance diagram for Cutelyst::StatusMessage:
Inheritance graph
[legend]

Public Member Functions

 StatusMessage (Application *parent)
 
QString errorMgStashKey () const
 
QString sessionPrefix () const
 
void setErrorMgStashKey (const QString &errorMgStashKey)
 
void setSessionPrefix (const QString &sessionPrefix)
 
void setStatusMsgStashKey (const QString &statusMsgStashKey)
 
void setTokenParam (const QString &tokenParam)
 
QString statusMsgStashKey () const
 
QString tokenParam () const
 
- Public Member Functions inherited from Cutelyst::Plugin
 Plugin (Application *parent)
 
virtual bool setup (Application *app)
 

Static Public Member Functions

static QString error (Context *c, const QString &msg)
 
static ParamsMultiMap errorQuery (Context *c, const QString &msg, ParamsMultiMap query=ParamsMultiMap())
 
static void load (Context *c)
 
static Q_DECL_DEPRECATED QString setError (Context *c, const QString &msg)
 
static Q_DECL_DEPRECATED QString setStatus (Context *c, const QString &msg)
 
static QString status (Context *c, const QString &msg)
 
static ParamsMultiMap statusQuery (Context *c, const QString &msg, ParamsMultiMap query=ParamsMultiMap())
 

Protected Attributes

StatusMessagePrivate * d_ptr
 

Detailed Description

Definition at line 29 of file statusmessage.h.

Member Function Documentation

static QString Cutelyst::StatusMessage::error ( Context c,
const QString &  msg 
)
static

Saves an error message returning the generated message id (mid)

QString Cutelyst::StatusMessage::errorMgStashKey ( ) const

The name of the stash key where error messages are loaded when $c->load_status_msgs is called. Defaults to error_msg.

static ParamsMultiMap Cutelyst::StatusMessage::errorQuery ( Context c,
const QString &  msg,
ParamsMultiMap  query = ParamsMultiMap() 
)
static

Saves an error message returning query parameters with the generated message id (mid) and it's token

static void Cutelyst::StatusMessage::load ( Context c)
static

Load both messages that match the token param (mid=###) into the stash for display by the view.

QString Cutelyst::StatusMessage::sessionPrefix ( ) const

The key prefix inside Session where messages will be stored. Defaults to "status_msg".

static Q_DECL_DEPRECATED QString Cutelyst::StatusMessage::setError ( Context c,
const QString &  msg 
)
static

DEPRECATED

See also
error Saves an error message returning the generated message id (mid)
static Q_DECL_DEPRECATED QString Cutelyst::StatusMessage::setStatus ( Context c,
const QString &  msg 
)
static

DEPRECATED

See also
status Saves a status message returning the generated message id (mid)
static QString Cutelyst::StatusMessage::status ( Context c,
const QString &  msg 
)
static

Saves a status message returning the generated message id (mid)

QString Cutelyst::StatusMessage::statusMsgStashKey ( ) const

The name of the stash key where "success" status messages are loaded when $c->load_status_msgs is called. Defaults to status_msg.

static ParamsMultiMap Cutelyst::StatusMessage::statusQuery ( Context c,
const QString &  msg,
ParamsMultiMap  query = ParamsMultiMap() 
)
static

Saves an status message returning query parameters with the generated message id (mid) and it's token

QString Cutelyst::StatusMessage::tokenParam ( ) const

The name of the URL param that holds the token on the page where you want to retrieve/display the status message. Defaults to "mid".