WIKINDX API trunk

BROWSECOMMON
in package

Common methods for user bibliographies

Table of Contents

Methods

__construct()  : mixed
BROWSECOMMON
colourText()  : string
Work out text colour based on field frequency.
quarantine()  : mixed
Conditions for quarantined resources
setPrivateConditions()  : mixed
Set database conditions for browsing musings where some entries might be private or available only to groups
setPrivateConditionsIdeas()  : mixed
Set database conditions for browsing ideas where some entries might be private or available only to groups
sizeText()  : string
Work out text size based on field frequency.
userBibCondition()  : array<string|int, mixed>
Return a SQL condition clause if we are browsing a user bibliography to ensure that listed, selected or searched resources come only from that user bibliography.

Methods

colourText()

Work out text colour based on field frequency.

public colourText(int $lowestSum, int $highestSum, int $frequency) : string
Parameters
$lowestSum : int
$highestSum : int
$frequency : int
Return values
string

quarantine()

Conditions for quarantined resources

public quarantine([bool $joinMisc = false ][, string $joinId = 'resourceId' ][, bool $print = false ]) : mixed
Parameters
$joinMisc : bool = false

Default is FALSE

$joinId : string = 'resourceId'

Default is 'resourceId'

$print : bool = false

= FALSE

'return array

setPrivateConditions()

Set database conditions for browsing musings where some entries might be private or available only to groups

public setPrivateConditions() : mixed

setPrivateConditionsIdeas()

Set database conditions for browsing ideas where some entries might be private or available only to groups

public setPrivateConditionsIdeas() : mixed

sizeText()

Work out text size based on field frequency.

public sizeText(int $lowestSum, int $highestSum, int $frequency) : string

Size range is 1em to 1.5em for items with $index of <= 255 and more for anything larger. Limit maximum size to 2.

Parameters
$lowestSum : int
$highestSum : int
$frequency : int
Return values
string

userBibCondition()

Return a SQL condition clause if we are browsing a user bibliography to ensure that listed, selected or searched resources come only from that user bibliography.

public userBibCondition(string $field[, bool $bibInfo = true ][, bool $print = false ]) : array<string|int, mixed>
Parameters
$field : string

SQL field to join 'userbibliographyresourceResourceId' to

$bibInfo : bool = true

If TRUE, gather bibliography details into $this->bibInfo. Default is TRUE

$print : bool = false

= FALSE

Return values
array<string|int, mixed>

        
On this page

Search results