abstract class Backend_Controller

This is the base class for implementing administrative controllers (DVelum 0.9 and higher).

abstract class Backend_Controller extends Controller
{
    /**
     * Module id assigned to controller;
     * Is to be defined in child class
     * Is used for controlling access permissions
     * @var string
     */
    protected $_module;

    /**
     * Link to Config object of the main configuration file 
     * @var Config_Abstract  
     */
    protected $_configMain;

    /**
     * Link to Config object of the backend application 
     * @var Config_Abstract
     */
    protected $_configBackend;

    /**
     * Link to Config object of  the connected JS files 
     * @var Config_Abstract
     */
    protected $_configJs;

    /**
     * Link to User object (current user)
     * @var User
     */
    protected $_user;

    /**
     * The checkbox signifies whether the current request has 
     * been sent using AJAX
     */
    protected $_isAjaxRequest;

    public function __construct()

    /**
     * Include required JavaScript files defined in the configuration file
     */
    public function includeScripts()

    /**
     * Send JSON error message
     * @return string
     */
    protected function _errorResponse($msg)

    /**
     * Get module name of the current class
     * @return string
     */
    public function getModule()

    /**
     * Check user permissions and authentication
     */
    public function checkAuth()

    /**
     * Show login form
     */
    protected function loginAction()

    /**
     * Get posted data and put it into Db_Object
     * (in case of failure, JSON error message is sent)
     * @param string $objectName
     * @return Db_Object
     */
    public function getPostedData($objectName)

    /**
     * Check edit permissions
     */
    protected function _checkCanEdit()

    /**
     * Check delete permissions
     */
    protected function _checkCanDelete()

    /**
     * Default action
     */
    public function indexAction()

    /**
     * Run Layout project
     * @param string $project - path to project file
     */
    protected function _runDesignerProject($project)	
}

comments powered by Disqus