Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes

AppController Class Reference

Controller base class for backends+frontends. More...

Inheritance diagram for AppController:
AuthenticationsController FilesController FrontendController HomeController ModulesController PagesController StreamsController ApiBaseController AddressbookController AdminController AreasController CommentsController DocumentsController EventsController GalleriesController MultimediaController NewsController NewsletterController StatisticsController TagsController TranslationsController UsersController WebmarksController

List of all members.

Public Member Functions

 __construct ()
 Constructor If debugKit is enabled in configuration and it's found in plugins paths then add it to self::componenets array.
 handleError ($eventMsg, $userMsg, $errTrace=null, $usrMsgParams=array())
 setResult ($r)
 beforeFilter ()
 beforeRender ()
 Redirect and class method result.
 afterFilter ()
 objectRelationArray ($objectArray, $status=array(), $options=array())
 Reorder content objects relations in array where keys are relation names.

Static Public Member Functions

static currentController ()
static usedUrl ()

Public Attributes

 $helpers = array('Javascript', 'Html', 'BeForm', 'Beurl', 'Tr', 'Session', 'Perms', 'BeEmbedMedia', 'SessionFilter')
 $components
 $uses = array('EventLog')
 $view = 'Smarty'
 $ext = '.tpl'
const OK = 'OK'
 Result types for methods.
const ERROR = 'ERROR'
const VIEW_FWD = 'view://'
 $result = 'OK'
 $BeObjectCache = null

Protected Member Functions

 initAttributes ()
 beforeCheckLogin ()
 convienience method to do operations before login check for example you could set AppController::skipCheck to true avoiding user session check
 startProfiler ()
 Start profiler.
 stopProfiler ($save=true)
 Stop profiler and save data.
 setupLocale ()
 updateHistory ()
 forward ($action, $outcome)
 beditaBeforeFilter ()
 local 'beforeFilter' (for backend or frontend)
 beditaBeforeRender ()
 local 'beforeRender' (for backend or frontend)
 beditaAfterFilter ()
 local 'afterFilter' (for backend or frontend)
 eventLog ($level, $msg)
 userErrorMessage ($msg, $layout='message', $params=array('class'=> 'error'))
 User error message (will appear in messages div).
 userWarnMessage ($msg, $layout='message', $params=array('class'=> 'warn'))
 User warning message (will appear in messages div).
 userInfoMessage ($msg, $layout='message', $params=array('class'=> 'info'))
 User info message (will appear in messages div).
 eventInfo ($msg)
 Info message in system event logs.
 eventWarn ($msg)
 Warning message in system event logs.
 eventError ($msg)
 Error message in system event logs.
 checkLogin ()
 Modules access: verify user permits.
 setup_args ()
 Function arguments setup.
 loadModelByObjectTypeId ($obj_type_id)
 loadModelByType ($modelClass)
 modelBindings (Model $modelObj, $level= 'default')
 set model bindings and return the array used
 setObjectBindings ($modelType, $level= 'frontend')
 set model bindings for BEdita object
 setupAnnotations (array &$objectArray, $status=array())
 Setup object array with annotations-type details.
 checkObjectWritePermission ($objectId)
 saveObject (BEAppModel $beModel, array $options=array())
 deleteObjects ($model)
 Delete objects.
 viewRevision (BEAppModel $beModel, $id, $rev)
 View revision data for a specific object and revision number: * all data as in revision in $revision array * array of changed fields in $diff.

Protected Attributes

 $moduleName = NULL
 $moduleList = NULL
 $modulePerms = NULL
 $skipCheck = false
 $currLang = NULL
 $currLocale = NULL
 $profiling = false
 $modelBindings = array()
 $fullBaseUrl = ''
 $historyItem = array()

Static Protected Attributes

static $current = NULL

Detailed Description

Controller base class for backends+frontends.

Definition at line 28 of file app_controller.php.


Member Function Documentation

AppController::beforeRender (  )  [final]

Redirect and class method result.

If form contains: $this->data['OK'] or $this->data['ERROR'] redirect to thes values (on OK, on ERROR)

If the class defines: $this->REDIRECT[<method_name>]['OK'] or $this->REDIRECT[<method_name>]['ERROR'] redirect to thes values (on OK, on ERROR)

Otherwise no redirect

Definition at line 291 of file app_controller.php.

References beditaBeforeRender(), and BeLib::getObject().

AppController::checkLogin (  )  [protected]

Modules access: verify user permits.

Uses BeAuth Component.

Load the list of the modules availables for the user.

Reimplemented in ApiBaseController, and FrontendController.

Definition at line 440 of file app_controller.php.

References eventWarn(), and userWarnMessage().

AppController::deleteObjects ( model  )  [protected]
AppController::eventError ( msg  )  [protected]

Error message in system event logs.

Parameters:
string $msg

Definition at line 430 of file app_controller.php.

Referenced by FrontendController::hashjob(), AreasController::import(), HomeController::importData(), AuthenticationsController::recoverUserPassword(), and MultimediaController::view().

AppController::eventWarn ( msg  )  [protected]

Warning message in system event logs.

Parameters:
string $msg

Definition at line 421 of file app_controller.php.

Referenced by checkLogin().

AppController::modelBindings ( Model $  modelObj,
level = 'default' 
) [protected]

set model bindings and return the array used

Parameters:
Model $modelObj
string $level binding level as defined in Model::modelBindings array
Returns:
array

Definition at line 593 of file app_controller.php.

Referenced by FrontendController::getPath(), FrontendController::loadArchiveTree(), objectRelationArray(), setObjectBindings(), and setupAnnotations().

AppController::objectRelationArray ( objectArray,
status = array(),
options = array() 
)

Reorder content objects relations in array where keys are relation names.

Parameters:
array $objectArray
array $status, default get all objects
array $options, possible values are 'mainLanguage' => set fields with "mainLanguage" value 'user' => in frontend app check frontend access that user
Returns:
array

Definition at line 649 of file app_controller.php.

References modelBindings(), and setObjectBindings().

Referenced by FrontendController::loadObj(), PagesController::printme(), and MultimediaController::view().

AppController::setObjectBindings ( modelType,
level = 'frontend' 
) [protected]

set model bindings for BEdita object

Parameters:
string $modelType model name of BE object
string $level model binding level
Returns:
array that contains: "bindings_used" => multidimensional array of bindings used, "bindings_list" => one dimensional array with the simple list of bindings ordered using a "natural order" algorithm

Definition at line 619 of file app_controller.php.

References modelBindings().

Referenced by FrontendController::loadObj(), and objectRelationArray().

AppController::setup_args (  )  [protected]

Function arguments setup.

If variable is null, use $this->params[url]. Parameters: 0..N array: 0 var name 1 type [string] (for the function settype) 2 reference to the variable to modify

Definition at line 538 of file app_controller.php.

Referenced by ModulesController::paginatedList(), and MultimediaController::view().

AppController::setupAnnotations ( array &$  objectArray,
status = array() 
) [protected]

Setup object array with annotations-type details.

Parameters:
array $objectArray
array $status, default get all objects
Returns:
array

Definition at line 731 of file app_controller.php.

References modelBindings().

Referenced by FrontendController::loadObj(), PagesController::printme(), and MultimediaController::view().

AppController::userErrorMessage ( msg,
layout = 'message',
params = array('class' => 'error') 
) [protected]
AppController::userWarnMessage ( msg,
layout = 'message',
params = array('class' => 'warn') 
) [protected]

User warning message (will appear in messages div).

Parameters:
string $msg

Definition at line 396 of file app_controller.php.

Referenced by checkLogin(), WebmarksController::save(), and EventsController::view().

AppController::viewRevision ( BEAppModel beModel,
id,
rev 
) [protected]

View revision data for a specific object and revision number: * all data as in revision in $revision array * array of changed fields in $diff.

Parameters:
BEAppModel $beModel
int $id, object ud
int $rev, revision number

Definition at line 889 of file app_controller.php.

Referenced by PagesController::revision().


Member Data Documentation

AppController::$components
Initial value:
 array(
        'BeAuth',
        'BeTree',
        'BeCustomProperty',
        'Transaction',
        'Cookie',
        'Session',
        'RequestHandler',
        'ResponseHandler',
        'BeHash',
        'SessionFilter'
    )

Definition at line 32 of file app_controller.php.


The documentation for this class was generated from the following file:
Generated on Fri Dec 11 2015 15:29:46 by Doxygen 1.7.1  BEditaBEdita 3.7 Corylus