Option
extends Element
in package
Uses
IdentifiableElementTrait, IntegrableElementTrait, ElementNameTrait, EnumResolverTrait
This is the basket product options class.
The basket product options information will be stored in that class and will remain immutable (only get methods are available)
Tags
Table of Contents
$combinable | : bool | |
---|---|---|
$error | : Error|null | |
$id | Autonumeric element id. | : int |
$name | : string | |
$pId | Public and readable element id. | : string |
$required | : bool | |
$type | : string | |
getCombinable() | Sets if the option is combinable. | : bool |
getError() | Returns the current element error (if there is error). | : Error|null |
getId() | Returns the element id. | : int |
getName() | Returns the element name on the website current language. | : string |
getPId() | Returns the element public id (pId). | : string |
getRequired() | Sets if the option is required. | : bool |
getType() | Returns the option type. | : string |
setError() | : void |
Properties
$combinable
protected
bool
$combinable
= false
$error
protected
Error|null
$error
= null
$id
Autonumeric element id.
protected
int
$id
= 0
All the given elements by the LogiCommerce API will send it.
$name
protected
string
$name
= ''
$pId
Public and readable element id.
protected
string
$pId
= ''
Setted by the user on LogiCommerce. All the integrable elements by the LogiCommerce API will send it. Useful for integrations and other 3rd party softwares that need to connect to LogiCommerce software.
$required
protected
bool
$required
= false
$type
protected
string
$type
= ''
Methods
getCombinable()
Sets if the option is combinable.
public
getCombinable() : bool
Return values
bool —getError()
Returns the current element error (if there is error).
public
getError() : Error|null
Return values
Error|null —getId()
Returns the element id.
public
getId() : int
Return values
int —getName()
Returns the element name on the website current language.
public
getName() : string
Return values
string —getPId()
Returns the element public id (pId).
public
getPId() : string
Return values
string —getRequired()
Sets if the option is required.
public
getRequired() : bool
Return values
bool —getType()
Returns the option type.
public
getType() : string
Return values
string —setError()
protected
setError(mixed $error) : void
Parameters
- $error : mixed