HomepageSettingsController

Extends\LSBaseController

Class LSBaseController

this controller will have all the necessary methods from the old AdminController

package

Default

Methods

Basic initialiser to the base controller class

__construct(string $id,\CWebModule $module = null)
inherited
access

public

Arguments

$id

string

$module

\CWebModule

Check that installation was already done by looking for config.php Will redirect to the installer script if not exists.

_checkInstallation(): void
inherited
access

protected

_init

_init()
inherited

accessRules

accessRules(): array

Response

array

Performs the AJAX toggle of show_survey_list_search

actionChangeBoxesInContainer(): void

Renders the form view and create/save new box

actionCreateBox(): void

Deletes a box

actionDeleteBox(integer $id = null): void
Throws
\CDbException
\CHttpException

Arguments

$id

integer

Renders the index view (boxes gridView and settings switchers

actionIndex(): void

Restores the default boxes entries and redirects to index

actionResetAllBoxes(): void

Performs the AJAX toggle of show_last_survey_and_question setting

actionToggleShowLastSurveyAndQuestion(): void

Performs the AJAX toggle of show_logo setting

actionToggleShowLogoStatus()

Performs the AJAX toggle of show_survey_list

actionToggleShowSurveyList(): void

Performs the AJAX toggle of show_survey_list_search

actionToggleShowSurveyListSearch()

Update a box.

actionUpdateBox(integer $id): void
Throws
\CHttpException

Arguments

$id

integer

Box id

Performs the AJAX update of box settings

actionUpdateBoxesSettings(integer $boxesbyrow,integer $boxesoffset): boolean

Arguments

$boxesbyrow

integer

$boxesoffset

integer

Response

boolean

This part comes from _renderWrappedTemplate (not the best way to refactoring, but a temporary solution)

beforeRender(string $view): boolean
inherited

todo REFACTORING find all actions that set $aData['surveyid'] and change the layout directly in the action

Arguments

$view

string

Response

boolean

Creates an absolute URL based on the given controller and action information.

createAbsoluteUrl(string $route,array $params = array(),string $schema = '',string $ampersand = '&'): string
inherited

Arguments

$route

string

the URL route. This should be in the format of 'ControllerID/ActionID'.

$params

array

additional GET parameters (name=>value). Both the name and value will be URL-encoded.

$schema

string

schema to use (e.g. http, https). If empty, the schema used for the current request will be used.

$ampersand

string

the token separating name-value pairs in the URL.

Response

string

the constructed URL

Loads a helper

loadHelper(string $helper): void
inherited
access

public

Arguments

$helper

string

Loads a library

loadLibrary(string $library): void
inherited
access

public

Arguments

$library

string

Returns the data model based on the primary key given in the GET variable.

loadModel(integer $id): \Box

If the data model is not found, an HTTP exception will be raised.

Throws
\CHttpException

Arguments

$id

integer

the ID of the model to be loaded

Response

\Box

the loaded model

Loads page states from a hidden input.

loadPageStates(): array
inherited

Response

array

the loaded page states

Performs the AJAX validation.

performAjaxValidation(\Box $model): void

Arguments

$model

\Box

the model to be validated

Method to render an array as a json document (this one called by a lot of actions in different controllers)

renderJSON(array $aData, $success = true): void
inherited

Arguments

$aData

array

$success

Checks for action specific authorization and then executes an action

run(string $action): void
inherited

TODO: check the dbupdate mechanism, do we really want to check db update before every action??

access

public

Throws
\CException
\CHttpException

Arguments

$action

string

Load and set session vars

sessionControl(): void
inherited

todo REFACTORING see comments in mehtod

access

protected

Properties

this is needed for the preview rendering inside the questioneditor

sTemplate :null
inherited
var

this is needed for the preview rendering inside the questioneditor

Type(s)

null

import for all new controllers/actions (REFACTORING) to pass data before rendering the content

aData :array
inherited
var

import for all new controllers/actions (REFACTORING) to pass data before rendering the content

Type(s)

array

userId of the logged in user

userId :integer
inherited
var

userId of the logged in user

Type(s)

integer

This array contains the survey / group / question id used by the menu widget.

navData :array
inherited
var

Type(s)

array