Docs Goabase

Vote
in package
uses TraitDataWrite, TraitUser

Table of Contents

Properties

$env  : array<string|int, mixed>
$nRecordID  : int
$nUserID  : int
$strTable  : string
$voteIcons  : VoteIcons

Methods

__construct()  : mixed
ajaxWriteVoteGetResult()  : array<string|int, mixed>
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
updateVoteTable()  : void
determineAjaxAction()  : string
getAjaxVotesTemplate()  : string
getInfoSQL()  : string
Nur das SQL für summe, anzahl
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
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
Tags
throws
RandomException
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

Tags
throws
RandomException
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

updateVoteTable()

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

determineAjaxAction()

private determineAjaxAction() : string
Return values
string

getAjaxVotesTemplate()

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

getInfoSQL()

Nur das SQL für summe, anzahl

private getInfoSQL() : string
Return values
string

getMembersVote()

get vote infos from a user

private getMembersVote(array<string|int, mixed> $saVoted) : array{id: int, vote: int}
Parameters
$saVoted : array<string|int, mixed>

, record_id, table_name

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
Tags
throws
Exception
throws
RandomException
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>
Tags
throws
RandomException
Return values
string

getVoteStatus()

private getVoteStatus() : string
Tags
throws
Exception
Return values
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