TopbarConfiguration

package

Default

Methods

Creates and instance of TopbarConfiguration based on the received $config array, which is expected to have the following keys (all keys are optional): 'name' => The name of the main view to use.

__construct(array $config = array())

'topbarId' => The topbar ID. Will normally be used as ID for container html element of the topbar. 'leftSideView' => The name of the view to use for the left side of the topbar. 'rightSideView' => The name of the view to use for the right side of the topbar. 'hide' => Boolean indicating if the topbar should be hidden (used to hide the controller's default topbar on some actions)

Arguments

$config

array

Creates and instance of TopbarConfiguration based on the data array used for the views

createFromViewData(array $aData): \TopbarConfiguration
static

Arguments

$aData

array

Response

\TopbarConfiguration

getData

getData()

Returns Data for Groups Top Bar

getGroupTopbarData( $sid): array
static
Throws
\CException

Arguments

$sid

Response

array

getId

getId()

Get the data for the left side view

getLeftSideData()

getLeftSideView

getLeftSideView()

Returns Data for QuestionEditor Top Bar

getQuestionTopbarData( $sid): array
static
Throws
\CException

Arguments

$sid

Response

array

Returns Data for Responses Top Bar

getResponsesTopbarData( $sid): array
static
Throws
\CException

Arguments

$sid

Response

array

Get the data for the right side view

getRightSideData()

getRightSideView

getRightSideView()

Returns Data for Right Side of Survey Top Bar

getRightSurveyTopbarData( $sid): array
static
Throws
\CException

Arguments

$sid

Response

array

Tries to retrieve the survey ID from the config

getSid( $config)
static

Arguments

$config

getSurveyData

getSurveyData()

This Method is returning the Data for Survey Top Bar

getSurveyTopbarData(integer $sid): array
static
Throws
\CException

Arguments

$sid

integer

Given Survey ID

Response

array

Returns Data for Tokens Top Bar

getTokensTopbarData( $sid): array
static
Throws
\CException

Arguments

$sid

Response

array

Gets the data for the specified view by calling the corresponding method and merging with general view data

getViewData( $view)

Arguments

$view

getViewName

getViewName()

shouldHide

shouldHide()

Properties

Name of the topbar view

viewName :string
var

Name of the topbar view

Type(s)

string

Topbar ID

id :string
var

Topbar ID

Type(s)

string

Data to be passed to the view

data :array
var

Data to be passed to the view

Type(s)

array

Name of the view used to render the left side of the topbar

leftSideView :string
var

Name of the view used to render the left side of the topbar

Type(s)

string

Name of the view used to render the right side of the topbar

rightSideView :string
var

Name of the view used to render the right side of the topbar

Type(s)

string

Flag to hide the whole topbar

hide :boolean
var

Flag to hide the whole topbar

Type(s)

boolean

Maps views to the methods used to get their extra data

extraDataMapping :array
var

Maps views to the methods used to get their extra data

Type(s)

array