class Compare extends Deposit

Class Compare

Constants

LIMIT_REACHED

Limit Reached identifier.

ALREADY_ADDED

Already added identifer.

Properties

null $depositNamespace Deposit Namespace. from Deposit
array $depositData Deposit Data. from Deposit
array $maxElements set max elements per deposit set 0 for no limit. from Deposit

Methods

bool
add($id, bool $value = true)

Add a Element to Deposit.

from Deposit
remove($id)

Remove a Element from Deposit.

from Deposit
bool
allowedToAdd($id)

Check if element is allowed to add.

from Deposit
__construct()

Compare constructor.

setMaxCompareElements( int $maxElements = 3)

set limit how many elements are allowed.

mixed
getCompareList()

Calculates the total for the CartItem.

Details

in Deposit at line line 124
bool add($id, bool $value = true)

Add a Element to Deposit.

Parameters

$id
bool $value

Return Value

bool

in Deposit at line line 141
remove($id)

Remove a Element from Deposit.

Parameters

$id

in Deposit at line line 157
bool allowedToAdd($id)

Check if element is allowed to add.

Parameters

$id

Return Value

bool

at line line 35
__construct()

Compare constructor.

at line line 45
setMaxCompareElements( int $maxElements = 3)

set limit how many elements are allowed.

Parameters

int $maxElements

at line line 54
mixed getCompareList()

Calculates the total for the CartItem.

Return Value

mixed