LimeSurvey API - Master branch

BreadcrumbWidget extends CWidget
in package

Creates the breadcrumbs for the topbar If the text legth of the full breadcrumbs are higher than the configured threshold, some elements will be replaced with an ellipsis

Tags
psalm-suppress

PropertyNotSetInConstructor

Table of Contents

Constants

THRESHOLD  = 44

Properties

$breadCrumbConfigArray  : array<string|int, mixed>
$htmlOptions  : array<string|int, mixed>

Methods

getBreadcrumbsArray()  : array<string|int, mixed>
builds the whole breadcrumb array for the view file
run()  : void
buildModuleSubActionBreadCrumbs()  : array<string|int, mixed>
Returns the breadcrumb array after potentially adding breadcrumb elements for module sub action
buildQuestionBreadCrumbs()  : array<string|int, mixed>
Returns the breadcrumb array after potentially adding breadcrumb elements for question
buildQuestionGroupBreadCrumbs()  : array<string|int, mixed>
Returns the breadcrumb array after potentially adding breadcrumb elements for question group
buildSurveyBreadCrumbs()  : array<string|int, mixed>
Returns the breadcrumb array after adding breadcrumb elements for survey
buildTokenBreadCrumbs()  : array<string|int, mixed>
Returns the breadcrumb array after potentially adding breadcrumb elements for token
getLengthOfBreadcrumb()  : int
returns the number of chars of the whole breadcrumb text
preserveOriginalBreadcrumbTexts()  : array<string|int, mixed>
copies full text of each breadcrumb into separate element 'fullText' for the tooltip
reduceBreadcrumbStringLength()  : mixed
Replaces 2nd and maybe 3rd element string with ellipsis to fit the maximum characters allowed for the whole breadcrumb
replaceCharsWithEllipsis()  : array<string|int, mixed>
Returns the breadcrumbs array after replacing the/some text of a element with ellipsis As of now the partially replacement of a string is not used.

Constants

THRESHOLD

private mixed THRESHOLD = 44
Tags
const

int the allowed maximal number of characters the breadcrumb should display

Properties

$breadCrumbConfigArray

public array<string|int, mixed> $breadCrumbConfigArray

containing different objects and strings needed for the building of the breadcrumbs

$htmlOptions

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

html options

Methods

getBreadcrumbsArray()

builds the whole breadcrumb array for the view file

public getBreadcrumbsArray(array<string|int, mixed> $breadcrumbConfigArray) : array<string|int, mixed>
Parameters
$breadcrumbConfigArray : array<string|int, mixed>
Return values
array<string|int, mixed>

buildModuleSubActionBreadCrumbs()

Returns the breadcrumb array after potentially adding breadcrumb elements for module sub action

private buildModuleSubActionBreadCrumbs(array<string|int, mixed> $breadcrumbConfigArray, array<string|int, mixed> $breadcrumbs) : array<string|int, mixed>
Parameters
$breadcrumbConfigArray : array<string|int, mixed>
$breadcrumbs : array<string|int, mixed>
Return values
array<string|int, mixed>

buildQuestionBreadCrumbs()

Returns the breadcrumb array after potentially adding breadcrumb elements for question

private buildQuestionBreadCrumbs(array<string|int, mixed> $breadcrumbConfigArray, array<string|int, mixed> $breadcrumbs) : array<string|int, mixed>
Parameters
$breadcrumbConfigArray : array<string|int, mixed>
$breadcrumbs : array<string|int, mixed>
Return values
array<string|int, mixed>

buildQuestionGroupBreadCrumbs()

Returns the breadcrumb array after potentially adding breadcrumb elements for question group

private buildQuestionGroupBreadCrumbs(array<string|int, mixed> $breadcrumbConfigArray, array<string|int, mixed> $breadcrumbs) : array<string|int, mixed>
Parameters
$breadcrumbConfigArray : array<string|int, mixed>
$breadcrumbs : array<string|int, mixed>
Return values
array<string|int, mixed>

buildSurveyBreadCrumbs()

Returns the breadcrumb array after adding breadcrumb elements for survey

private buildSurveyBreadCrumbs(array<string|int, mixed> $breadcrumbConfigArray, array<string|int, mixed> $breadcrumbs) : array<string|int, mixed>
Parameters
$breadcrumbConfigArray : array<string|int, mixed>
$breadcrumbs : array<string|int, mixed>
Return values
array<string|int, mixed>

buildTokenBreadCrumbs()

Returns the breadcrumb array after potentially adding breadcrumb elements for token

private buildTokenBreadCrumbs(array<string|int, mixed> $breadcrumbConfigArray, array<string|int, mixed> $breadcrumbs) : array<string|int, mixed>
Parameters
$breadcrumbConfigArray : array<string|int, mixed>
$breadcrumbs : array<string|int, mixed>
Return values
array<string|int, mixed>

getLengthOfBreadcrumb()

returns the number of chars of the whole breadcrumb text

private getLengthOfBreadcrumb(array<string|int, mixed> $breadcrumbs) : int
Parameters
$breadcrumbs : array<string|int, mixed>
Return values
int

preserveOriginalBreadcrumbTexts()

copies full text of each breadcrumb into separate element 'fullText' for the tooltip

private preserveOriginalBreadcrumbTexts(array<string|int, mixed> $breadcrumbs) : array<string|int, mixed>
Parameters
$breadcrumbs : array<string|int, mixed>
Return values
array<string|int, mixed>

reduceBreadcrumbStringLength()

Replaces 2nd and maybe 3rd element string with ellipsis to fit the maximum characters allowed for the whole breadcrumb

private reduceBreadcrumbStringLength(array<string|int, mixed> $breadcrumbs, int $countChars) : mixed
Parameters
$breadcrumbs : array<string|int, mixed>
$countChars : int

number of characters of the whole breadcrumbs text

replaceCharsWithEllipsis()

Returns the breadcrumbs array after replacing the/some text of a element with ellipsis As of now the partially replacement of a string is not used.

private replaceCharsWithEllipsis(array<string|int, mixed> $breadcrumbs, int $index[, int $location = 0 ]) : array<string|int, mixed>
Parameters
$breadcrumbs : array<string|int, mixed>

the full breadcrumbs array

$index : int

location of the element which needs to be fixed in the array

$location : int = 0

number of chars after the ellipsis should replace the remaining text. 0 means fully replace

Return values
array<string|int, mixed>

        
On this page

Search results