LimeSurvey API - Master branch

HomepageSettingsController extends LSBaseController
in package

Class HomepageSettingsController

Table of Contents

Properties

$aData  : array<string|int, mixed>
$navData  : array<string|int, mixed>
This array contains the survey / group / question id used by the menu widget.
$sTemplate  : null
$userId  : int

Methods

__construct()  : mixed
Basic initialiser to the base controller class
accessRules()  : array<string|int, mixed>
actionChangeBoxesInContainer()  : void
Performs the AJAX toggle of show_survey_list_search
actionCreateBox()  : void
Renders the form view and create/save new box
actionDeleteBox()  : void
Deletes a box
actionIndex()  : void
Renders the index view (boxes gridView and settings switchers
actionResetAllBoxes()  : void
Restores the default boxes entries and redirects to index
actionToggleShowLastSurveyAndQuestion()  : void
Performs the AJAX toggle of show_last_survey_and_question setting
actionToggleShowLogoStatus()  : mixed
Performs the AJAX toggle of show_logo setting
actionToggleShowSurveyList()  : void
Performs the AJAX toggle of show_survey_list
actionToggleShowSurveyListSearch()  : mixed
Performs the AJAX toggle of show_survey_list_search
actionUpdateBox()  : void
Update a box.
actionUpdateBoxesSettings()  : bool
Performs the AJAX update of box settings
beforeRender()  : bool
Register js script before rendering
createAbsoluteUrl()  : string
Returns an absolute URL based on the given controller and action information.
filters()  : array<string|int, string>
loadHelper()  : void
Loads a helper
loadLibrary()  : void
Loads a library
loadModel()  : Box
Returns the data model based on the primary key given in the GET variable.
run()  : void
Checks for action specific authorization and then executes an action
_checkInstallation()  : void
Check that installation was already done by looking for config.php Will redirect to the installer script if not exists.
customInit()  : mixed
loadPageStates()  : array<string|int, mixed>
Loads page states from a hidden input.
performAjaxValidation()  : void
Performs the AJAX validation.
renderJSON()  : void
Method to render an array as a json document (this one called by a lot of actions in different controllers)
sessionControl()  : void
Load and set session vars

Properties

$aData

public array<string|int, mixed> $aData = []

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

$navData

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

public array<string|int, mixed> $navData = array()

$sTemplate

public null $sTemplate = \null

this is needed for the preview rendering inside the questioneditor

Methods

__construct()

Basic initialiser to the base controller class

public __construct(string $id[, CWebModule $module = null ]) : mixed
Parameters
$id : string
$module : CWebModule = null
Tags
access

public

actionChangeBoxesInContainer()

Performs the AJAX toggle of show_survey_list_search

public actionChangeBoxesInContainer() : void

actionDeleteBox()

Deletes a box

public actionDeleteBox([int $id = null ]) : void
Parameters
$id : int = null
Tags
throws
CDbException
throws
CHttpException

actionResetAllBoxes()

Restores the default boxes entries and redirects to index

public actionResetAllBoxes() : void

actionToggleShowLastSurveyAndQuestion()

Performs the AJAX toggle of show_last_survey_and_question setting

public actionToggleShowLastSurveyAndQuestion() : void

actionToggleShowLogoStatus()

Performs the AJAX toggle of show_logo setting

public actionToggleShowLogoStatus() : mixed

actionToggleShowSurveyList()

Performs the AJAX toggle of show_survey_list

public actionToggleShowSurveyList() : void

actionToggleShowSurveyListSearch()

Performs the AJAX toggle of show_survey_list_search

public actionToggleShowSurveyListSearch() : mixed

actionUpdateBox()

Update a box.

public actionUpdateBox(int $id) : void
Parameters
$id : int

Box id

Tags
throws
CHttpException

actionUpdateBoxesSettings()

Performs the AJAX update of box settings

public actionUpdateBoxesSettings(int $boxesbyrow, int $boxesoffset) : bool
Parameters
$boxesbyrow : int
$boxesoffset : int
Return values
bool

beforeRender()

Register js script before rendering

public beforeRender(string $view) : bool
Parameters
$view : string
Return values
bool

createAbsoluteUrl()

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

public createAbsoluteUrl(string $route[, array<string|int, mixed> $params = array() ][, string $schema = '' ][, string $ampersand = '&' ]) : string

The functionalty was moved to \LSYii_Application::createPublicUrl, to be safe the function remains here.

Parameters
$route : string

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

$params : array<string|int, mixed> = 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.

Return values
string

the constructed URL

filters()

public filters() : array<string|int, string>
Return values
array<string|int, string>

action filters

loadHelper()

Loads a helper

public loadHelper(string $helper) : void
Parameters
$helper : string
Tags
access

public

loadLibrary()

Loads a library

public loadLibrary(string $library) : void
Parameters
$library : string
Tags
access

public

loadModel()

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

public loadModel(int $id) : Box

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

Parameters
$id : int

the ID of the model to be loaded

Tags
throws
CHttpException
Return values
Box

the loaded model

run()

Checks for action specific authorization and then executes an action

public run(string $action) : void

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

Parameters
$action : string
Tags
access

public

throws
CException
throws
CHttpException

_checkInstallation()

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

protected _checkInstallation() : void
Tags
access

protected

loadPageStates()

Loads page states from a hidden input.

protected loadPageStates() : array<string|int, mixed>
Return values
array<string|int, mixed>

the loaded page states

performAjaxValidation()

Performs the AJAX validation.

protected performAjaxValidation(Box $model) : void
Parameters
$model : Box

the model to be validated

renderJSON()

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

protected renderJSON(array<string|int, mixed> $aData[, mixed $success = true ]) : void
Parameters
$aData : array<string|int, mixed>
$success : mixed = true

sessionControl()

Load and set session vars

protected sessionControl() : void

todo REFACTORING see comments in mehtod

Tags
access

protected


        
On this page

Search results