|
TreeFrogFramework 2.10
|
#include <tabstractcontroller.h>


Public Member Functions | |
| TAbstractController () | |
| virtual | ~TAbstractController () |
| virtual QString | className () const |
| virtual QString | name () const =0 |
| virtual QString | activeAction () const =0 |
| virtual QStringList | arguments () const |
| virtual const THttpRequest & | httpRequest () const |
| virtual const THttpRequest & | request () const |
| virtual const TSession & | session () const |
| virtual QString | getRenderingData (const QString &templateName, const QVariantMap &vars=QVariantMap()) |
| virtual QByteArray | authenticityToken () const |
| virtual void | setFlash (const QString &name, const QVariant &value) |
| void | exportVariant (const QString &name, const QVariant &value, bool overwrite=true) |
| virtual bool | isUserLoggedIn () const |
| const TActionContext * | context () const |
| TActionContext * | context () |
| void | setContext (TActionContext *context) |
Static Public Member Functions | |
| static QThread * | currentThread () |
Protected Member Functions | |
| virtual TSession & | session () |
| virtual bool | addCookie (const TCookie &cookie) |
| virtual bool | addCookie (const QByteArray &name, const QByteArray &value, const QDateTime &expire=QDateTime(), const QString &path=QString(), const QString &domain=QString(), bool secure=false, bool httpOnly=false, const QByteArray &sameSite="Lax") |
| virtual bool | addCookie (const QByteArray &name, const QByteArray &value, int64_t maxAge, const QString &path=QString(), const QString &domain=QString(), bool secure=false, bool httpOnly=false, const QByteArray &sameSite="Lax") |
| virtual void | reset () |
| QVariant | variant (const QString &name) const |
| void | exportVariants (const QVariantMap &map) |
| void | exportValidationErrors (const TFormValidator &validator, const QString &prefix=QString("err_")) |
| bool | hasVariant (const QString &name) const |
| const QVariantMap & | allVariants () const |
| QString | viewClassName (const QString &action=QString()) const |
| QString | viewClassName (const QString &contoller, const QString &action) const |
Friends | |
| class | TDirectView |
The TAbstractController class is the abstract base class of controllers, providing functionality common to controllers.
| TAbstractController::TAbstractController | ( | ) |
Constructor.
|
inlinevirtual |
|
pure virtual |
This function is reimplemented in subclasses to return a active action name.
Implemented in TActionMailer, and TActionController.
|
protectedvirtual |
Reimplemented in TActionController.
|
protectedvirtual |
Reimplemented in TActionController.
|
protectedvirtual |
Reimplemented in TActionController.
|
inlineprotected |
Returns all the exported variables.
Internal use only.
|
inlinevirtual |
Reimplemented in TActionController.
|
inlinevirtual |
Reimplemented in TActionController.
|
inlinevirtual |
Returns the class name.
|
inline |
|
inline |
|
inlinestatic |
|
protected |
Exports validation error messages with the prefix prefix each.
| void TAbstractController::exportVariant | ( | const QString & | name, |
| const QVariant & | value, | ||
| bool | overwrite = true |
||
| ) |
Exports a new variable with the name name and a value of value for views.
Internal use only.
|
protected |
Exports the map.
Internal use only.
|
virtual |
Reimplemented in TActionController.
|
inlineprotected |
Returns true if a variable with the name is exported for views; otherwise returns false.
Internal use only.
|
virtual |
Reimplemented in TActionController.
|
virtual |
Returns true if a user is logged in to the system; otherwise returns false.
This is a virtual function.
Reimplemented in TActionController.
|
pure virtual |
This function is reimplemented in subclasses to return a controller name.
Implemented in TActionMailer, and TActionController.
|
virtual |
Reimplemented in TActionController.
|
inlineprotectedvirtual |
Reimplemented in TActionController.
|
protectedvirtual |
Reimplemented in TActionController.
|
virtual |
Reimplemented in TActionController.
|
inline |
|
virtual |
Reimplemented in TActionController.
|
inlineprotected |
Returns the exported variable with the value associated with the name.
|
protected |
Returns a class name of a view for the action action of the active controller.
Internal use only.
|
protected |
Returns a class name of a view for the action action of the controller controller.
Internal use only.
|
friend |