function __construct() { $this->name = 'version'; // set user level allowed to access the actions with required login $this->user_level_required = N_USER_NORIGHTS; $this->public_actions = array('view', 'reinstate'); $this->login_required = true; parent::__construct(); }
function &getDefaultModel() { if (get_class($this) == __CLASS__) { $ret =& $this->loadModel('cms_asset_info'); } else { $ret =& parent::getDefaultModel(); } return $ret; }
function __construct() { $this->name = 'page_content'; parent::__construct(); $this->login_required = true; $this->public_actions = array('select_content_type', 'add_new_content', 'add_existing_content', 'remove_content', 'reorder'); // set user level allowed to access the actions with required login $this->user_level_required = N_USER_NORIGHTS; $this->base_view_dir = ROOT_DIR; }
function __construct() { $this->name = 'workflow_group'; // set user level allowed to access the actions with required login $this->user_level_required = N_USER_ADMIN; // this whole controller requires login if called directly $this->login_required = true; $this->base_dir = APP_DIR; $this->page_title = 'Workflow Groups'; parent::__construct(); }
function __construct() { $this->name = 'dashboard'; $this->default_action = 'show'; $this->page_title = 'Your Dashboard'; // set user level allowed to access the actions with required login $this->user_level_required = N_USER_NORIGHTS; $this->login_required = true; $this->base_view_dir = ROOT_DIR; parent::__construct(); }
function __construct() { if (get_class($this) == __CLASS__) { $this->name = 'site_admin'; // login required $this->login_required = true; // set user level allowed to access the actions with required login $this->user_level_required = N_USER_NORIGHTS; // set up view caching values $this->view_cache_name = 'nterchange_site_admin'; $this->view_caching = true; $this->view_cache_lifetime = -1; // forever } parent::__construct(); }
function delete($parameter) { $model =& $this->getDefaultModel(); if ($model->get($parameter)) { if (($page_content_model =& $model->getLink('page_content_id', 'page_content')) && $page_content_model->cms_workflow == 1) { $page_content_model->delete(); } } $model->reset(); if (defined('SITE_AUDIT_TRAIL') && SITE_AUDIT_TRAIL) { // audit trail $audit_trail =& NController::factory('audit_trail'); $audit_trail->insert(array('asset' => $model->asset, 'asset_id' => $model->asset_id, 'action_taken' => AUDIT_ACTION_WORKFLOW_DELETE, 'workflow_id' => $model->{$model->primaryKey()}, 'workflow_group_id' => $model->workflow_group_id, 'page_id' => $model->page_id, 'page_content_id' => $model->page_content_id)); unset($audit_trail); } parent::delete($parameter); }
function edit($parameter) { $this->loadSubnav($parameter); parent::edit($parameter); }
function create($parameter) { $model =& $this->getDefaultModel(); $model->user_id = (int) $this->_auth->currentUserId(); $this->flash->set('notice', 'Your preference has been saved.'); return parent::create($parameter); }
/** * Sets some app-specific variables and calls parent::renderLayout * * This method auto-loads the nterchange navigation * * @see NController::renderLayout, NView::renderLayout * @access public * @return null */ function renderLayout($layout, $main_content, $sidebar_content = null, $return = false) { $this->set('navigation', nterchangeController::navigation($this->name)); if (isset($this->_auth) && is_object($this->_auth)) { $this->set('login_name', $this->_auth->getAuthData('real_name')); } $this->set('nterchange_version', NTERCHANGE_VERSION); return parent::renderLayout($layout, $main_content, $sidebar_content, $return); }