Constants

TABLE_NAME

TABLE_NAME ='stats'

STATS_ACCEPTED_TYPE_ALL

STATS_ACCEPTED_TYPE_ALL =2

STATS_ACCEPTED_TYPE_PARTIAL

STATS_ACCEPTED_TYPE_PARTIAL =1

STATS_ACCEPTED_TYPE_NONE

STATS_ACCEPTED_TYPE_NONE =0

STATS_ACCEPTED_ALL_TYPES

STATS_ACCEPTED_ALL_TYPES =array(self::STATS_ACCEPTED_TYPE_ALL, self::STATS_ACCEPTED_TYPE_NONE, self::STATS_ACCEPTED_TYPE_PARTIAL)

Properties

Methods

getPluginConstantPrefix()

getPluginConstantPrefix(): string

Get the prefix of this plugin so composer packages can dynamically build other constant values on it.

Returns

string

fetchMainStats()

fetchMainStats(  $from,  $to,  $context)

Parameters

$from
$to
$context

fetchButtonsClickedStats()

fetchButtonsClickedStats(  $from,  $to,  $context = null)

Parameters

$from
$to
$context

fetchCustomBypassStats()

fetchCustomBypassStats(  $from,  $to,  $context = null)

Parameters

$from
$to
$context

persist()

persist(array  $consent,array  $previousConsent,string  $previousCreated)

Persist a new consent to a given group to the stats database table.

Parameters

array $consent
array $previousConsent

Do not count recurring users in stats

string $previousCreated

ISO string of previous consent

edited_group()

edited_group(integer  $term_id)

Fires after a group got changed, let's update the plain name in database for future display when the group got deleted.

Parameters

integer $term_id

getInstance()

getInstance()

Get singleton instance.

__construct()

__construct()

C'tor.

calculateGroupAcceptTypes()

calculateGroupAcceptTypes(array  $consent)

Calculate the accept types for a given consent. It returns an array of keyed term id with accept type.

Parameters

array $consent