Docs Goabase

Vote
in package
uses TraitData, TraitDataWrite, TraitUser

FinalYes

Table of Contents

Properties

$data  : Data
$env  : array<string|int, mixed>
$nRecordID  : int
$nUserID  : int
$strTable  : string
$user  : User

Methods

__construct()  : mixed
ajaxWriteVoteGetResult()  : array<string|int, mixed>
getDataInstance()  : Data
getDataWriteInstance()  : DataWrite
getFiveBox()  : string
Gets the complete 5 stars votingbox Will be called via x_get_data
getFiveStars()  : string
Returns the five stars in html elements for later ajax use
getSummary()  : array<string|int, mixed>
Get summary vote and persons of this entry
getUserInstance()  : User
determineAjaxAction()  : string
getAjaxVotesTemplate()  : string
getMembersVote()  : array{id: int, vote: int}
get vote infos from a user
getPlaceHoldersAndValues()  : array{nRecordID: int, strAction: string, strRandom: string, strTable: string, strVoteImg: string, cleanhtml: string, strVoted: string}
getVoteCheck()  : array<string|int, mixed>
getVoteImage()  : array<string|int, mixed>
getVoteOptions()  : string
getVoteStatus()  : string
updateVoteTable()  : void
writeVote()  : int
Writes the Vote to a record

Properties

$env

private array<string|int, mixed> $env

$nRecordID

private int $nRecordID

$nUserID

private int $nUserID

$strTable

private string $strTable

Methods

__construct()

public __construct([string $strTable = '' ][, int $nRecordID = 0 ]) : mixed
Parameters
$strTable : string = ''
$nRecordID : int = 0

the record id

ajaxWriteVoteGetResult()

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

getFiveBox()

Gets the complete 5 stars votingbox Will be called via x_get_data

public getFiveBox() : string
Return values
string

: complete html

getFiveStars()

Returns the five stars in html elements for later ajax use

public getFiveStars([bool $bCleanHtml = false ]) : string
Parameters
$bCleanHtml : bool = false

if true, we clean the html of the ajaxbox, needed in lists

Return values
string

getSummary()

Get summary vote and persons of this entry

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

$array[0] = votes $array[1] = persons

determineAjaxAction()

private determineAjaxAction() : string
Return values
string

getAjaxVotesTemplate()

private getAjaxVotesTemplate(int $nVI) : string
Parameters
$nVI : int
Return values
string

getMembersVote()

get vote infos from a user

private getMembersVote() : array{id: int, vote: int}
Return values
array{id: int, vote: int}

getPlaceHoldersAndValues()

private getPlaceHoldersAndValues(array<string|int, mixed> $voteInfo, string $strAction, bool $bCleanHtml) : array{nRecordID: int, strAction: string, strRandom: string, strTable: string, strVoteImg: string, cleanhtml: string, strVoted: string}
Parameters
$voteInfo : array<string|int, mixed>
$strAction : string
$bCleanHtml : bool
Return values
array{nRecordID: int, strAction: string, strRandom: string, strTable: string, strVoteImg: string, cleanhtml: string, strVoted: string}

getVoteCheck()

private getVoteCheck() : array<string|int, mixed>
Return values
array<string|int, mixed>

getVoteImage()

private getVoteImage() : array<string|int, mixed>
Return values
array<string|int, mixed>

getVoteOptions()

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

getVoteStatus()

private getVoteStatus() : string
Return values
string

updateVoteTable()

private updateVoteTable(string $strVoteTable) : void
Parameters
$strVoteTable : string

writeVote()

Writes the Vote to a record

private writeVote(int $nVote) : int

the values are in steps of 2,4,6,8,10

Parameters
$nVote : int
Tags
intern

param int $vote - wert des votings

intern

param int $ref_id - ID des datensatzes, auf den gevotet wird

Return values
int

        
On this page

Search results