class User extends User implements EquatableInterface, PrimaryKeyInterface, AdvanceUserInterface, UserInterface

Class User Extends default FOS User.

Properties

protected int $id
protected ArrayCollection|Group[] $groups Collection of groups for user
protected array $roles Collection of roles for user
protected bool $locked Indicates if user account is locked
protected bool $expired Indicates if user account has expired
protected array $userSpecificProductGroups Array that holds information about specific product groups discount for user. This field is auto-generated
protected bool $isActiveDefault
protected ArrayCollection $orders Collection of all orders user had made
protected string $type Type of user. One of defined(PERSONAL or COMPANY)
protected string $firstName User first name
protected string $lastName Last name of user
protected string $userCode Unique identifier for user. Used for storing user's erp code
protected string $userSecondaryCode Unique identifier for user. Used for storing user's code
protected array $phoneNumbers Array that holds mobile and phone number
protected Address $address Primary address for user
protected ArrayCollection|Address[] $shippingAddresses Collection of address
protected Company $company User's company. NULL if user type is not COMPANY
protected Image $avatar User's profile image
protected ArrayCollection|Statistics[] $statistics Collection of statistics for user
protected ArrayCollection|Ticket[] $tickets Collection of tickets created by user
protected ArrayCollection|Comment[] $comments Collection of ticket comments posted by user
protected Collection|CouponInterface[] $coupons Associated coupons
protected ArrayCollection|UserSpecificPricelist[] $userSpecificPricelists Collection of specific pricelist prices for user
protected string $facebook_id User's facebook id. Used for logging user via facebook
protected string $facebook_access_token User's facebook access token. Used for logging user via facebook
protected string $google_id User's google id. Used for logging user via google
protected string $google_access_token User's google access token. Used for logging user via google
protected string $twitter_id User's twitter id. Used for logging user via twitter
protected string $twitter_access_token User's twitter access token. Used for logging user via twitter
$facebookLink Url of user's facebook page
$twitterLink User's twitter access token
$gPlusLink Url of user's google page
protected $baseImageUrl Users' profile image url
protected bool $gdprConfirmed Indicates if user has confirmed gdpr cookies
protected string $title User's title
protected string $additionalInfo Additional user's information. Used for my team plugin
protected string $additionalUserInformation
protected ShippingProvider $defaultShippingProvider Shipping provider which will be preselected on checkout
protected string $defaultPaymentType Payment which will be preselected on checkout
protected float $accountBalance Account balance
protected float $accountBalancePlus Account balance
protected float $accountBalanceMinus Account balance
protected array $pricelistItemsArray Array that holds information about pricelist order for user and specific pricelist discounts for user. This field is auto-generated

Methods

__construct()

Constructor

bool
isActiveDefault()

No description

setIsActiveDefault(bool $isActiveDefault)

No description

setStatistics(mixed $statistics)

No description

string|null
getBaseImageUrl()

No description

setBaseImage()

Set image(if exist) url to user's property

bool
isEqualTo(UserInterface $user)

No description

integer
getId()

No description

reinitializeGroups()

No description

setGroups(array $groups)

No description

resetGroups()

Empty groups array

Collection
getGroups()

Gets the groups granted to the user.

array
getRoles()

No description

loadRoles()

Load roles for user, based on user's groups

boolean
hasRole(string $rol)

No description

setSalt(string $salt)

No description

ArrayCollection
getShippingAddresses()

No description

setShippingAddresses(ArrayCollection $shippingAddresses)

No description

addOrder(OrderInterface $order)

Adds order to user.

removeOrder(OrderInterface $order)

Remove order from user.

addShippingAddress(Address $address, $setUserOnAddress = true)

{@inheritdoc}

removeShippingAddress(Address $address)

{@inheritdoc}

Collection|OrderInterface[]
getOrders()

Get orders.

setOrders(null|Collection|OrderInterface[] $orders)

Set items.

string
getType()

No description

setType(string $type)

No description

string
getUserSecondaryCode()

No description

setUserSecondaryCode(string $userSecondaryCode)

No description

mixed
getAddress()

No description

setAddress(mixed $address)

No description

string
getUserCode()

No description

setUserCode(string $userCode)

No description

array
getPhoneNumbers()

No description

setPhoneNumbers(array $phoneNumbers)

No description

mixed
getCompany()

No description

setCompany(mixed $company)

No description

mixed
getAvatar()

No description

setAvatar(mixed $avatar)

No description

string
getFirstName()

No description

setFirstName(string $firstName)

No description

string
getLastName()

No description

setLastName(string $lastName)

No description

string
getAddressToString()

No description

addStatistic(Statistics $statistic)

Add statistic

removeStatistic(Statistics $statistic)

Remove statistic

Collection
getStatistics()

Get statistics

getTickets()

{@inheritdoc}

array
getOrdersWithoutAbandonedCarts()

Retrieve all finished orders sorted by created at

array
getOrderSWithIDasKey()

No description

setPropertyValue(string $name, mixed $value)

No description

mixed|null
getPropertyValue(string $property)

No description

addProductToWishList(Product $product)

Adds product to wishlist.

removeProductFromWishList(Product $product)

No description

ArrayCollection
getWishList()

No description

setWishList(mixed $wishList)

No description

addCoupon(Coupon $coupon)

No description

removeCoupon(Coupon $coupon)

No description

ArrayCollection
getCoupons()

No description

string
getFacebookId()

No description

setFacebookId(string $facebook_id)

No description

string
getFacebookAccessToken()

No description

setFacebookAccessToken(string $facebook_access_token)

No description

string
getGoogleAccessToken()

No description

setGoogleAccessToken(string $google_access_token)

No description

string
getGoogleId()

No description

setGoogleId(string $google_id)

No description

string
getTwitterId()

No description

setTwitterId(string $twitter_id)

No description

string
getTwitterAccessToken()

No description

setTwitterAccessToken(string $twitter_access_token)

No description

string
getFacebookLink()

No description

setFacebookLink(string $facebookLink)

No description

string
getTwitterLink()

No description

setTwitterLink(string $twitterLink)

No description

string
getGPlusLink()

No description

setGPlusLink(string $gPlusLink)

No description

bool
isGdprConfirmed()

No description

setGdprConfirmed(bool $gdprConfirmed)

No description

string
getTitle()

No description

setTitle(string $title)

No description

string
getAdditionalInfo()

No description

setAdditionalInfo(string $additionalInfo)

No description

string
getAdditionalUserInformation()

No description

setAdditionalUserInformation(string $additionalUserInformation)

No description

setId(int $id)

No description

bool
isAccountNonLocked()

No description

setLocked(bool $boolean)

No description

bool
isLocked()

No description

bool
isExpired()

No description

setExpired(bool $expired)

No description

setDefaultShippingProvider(ShippingProvider|Proxy $defaultShippingProvider)

No description

int
getDefaultPaymentType()

No description

setDefaultPaymentType(string $defaultPaymentType)

No description

float
getAccountBalance()

No description

setAccountBalance(float $accountBalance)

No description

float
getAccountBalancePlus()

No description

setAccountBalancePlus(float $accountBalancePlus)

No description

float
getAccountBalanceMinus()

No description

setAccountBalanceMinus(float $accountBalanceMinus)

No description

bool
isB2B()

No description

addUserSpecificPricelist(UserSpecificPricelist $userSpecificPricelist)

No description

removeUserSpecificPricelist(UserSpecificPricelist $userSpecificPricelist)

No description

ArrayCollection
getUserSpecificPricelists()

No description

array
getUserSpecificProductGroups()

No description

setUserSpecificProductGroups(array $userSpecificProductGroups)

No description

addUserSpecificProductGroup(array $userSpecificProductGroup)

No description

array
getPricelistItemsArray()

No description

setPricelistItemsArray(array $pricelistItemsArray)

No description

Details

at line 524
__construct()

Constructor

at line 541
bool isActiveDefault()

Return Value

bool

at line 551
User setIsActiveDefault(bool $isActiveDefault)

Parameters

bool $isActiveDefault

Return Value

User

at line 563
User setStatistics(mixed $statistics)

Parameters

mixed $statistics

Return Value

User

at line 573
string|null getBaseImageUrl()

Return Value

string|null

at line 583
User setBaseImage()

Set image(if exist) url to user's property

Return Value

User

at line 599
bool isEqualTo(UserInterface $user)

Parameters

UserInterface $user

Return Value

bool

at line 621
integer getId()

Return Value

integer

at line 629
User reinitializeGroups()

Return Value

User

at line 641
setGroups(array $groups)

Parameters

array $groups

at line 653
resetGroups()

Empty groups array

at line 667
Collection getGroups()

Gets the groups granted to the user.

Return Value

Collection

at line 675
array getRoles()

Return Value

array

at line 688
User loadRoles()

Load roles for user, based on user's groups

Return Value

User

at line 710
boolean hasRole(string $rol)

Parameters

string $rol

Return Value

boolean

at line 720
setSalt(string $salt)

Parameters

string $salt

at line 730
ArrayCollection getShippingAddresses()

Return Value

ArrayCollection

at line 744
User setShippingAddresses(ArrayCollection $shippingAddresses)

Parameters

ArrayCollection $shippingAddresses

Return Value

User

at line 754
addOrder(OrderInterface $order)

Adds order to user.

Parameters

OrderInterface $order

at line 763
removeOrder(OrderInterface $order)

Remove order from user.

Parameters

OrderInterface $order

at line 771
addShippingAddress(Address $address, $setUserOnAddress = true)

{@inheritdoc}

Parameters

Address $address
$setUserOnAddress

at line 782
removeShippingAddress(Address $address)

{@inheritdoc}

Parameters

Address $address

at line 790
Collection|OrderInterface[] getOrders()

Get orders.

Return Value

Collection|OrderInterface[] An array or collection of OrderInterface

at line 798
setOrders(null|Collection|OrderInterface[] $orders)

Set items.

Parameters

null|Collection|OrderInterface[] $orders

at line 806
string getType()

Return Value

string

at line 814
setType(string $type)

Parameters

string $type

at line 824
string getUserSecondaryCode()

Return Value

string

at line 834
User setUserSecondaryCode(string $userSecondaryCode)

Parameters

string $userSecondaryCode

Return Value

User

at line 844
mixed getAddress()

Return Value

mixed

at line 852
setAddress(mixed $address)

Parameters

mixed $address

at line 862
string getUserCode()

Return Value

string

at line 872
User setUserCode(string $userCode)

Parameters

string $userCode

Return Value

User

at line 882
array getPhoneNumbers()

Return Value

array

at line 893
User setPhoneNumbers(array $phoneNumbers)

Parameters

array $phoneNumbers

Return Value

User

at line 903
mixed getCompany()

Return Value

mixed

at line 911
setCompany(mixed $company)

Parameters

mixed $company

at line 921
mixed getAvatar()

Return Value

mixed

at line 931
setAvatar(mixed $avatar)

Parameters

mixed $avatar

at line 941
string getFirstName()

Return Value

string

at line 949
setFirstName(string $firstName)

Parameters

string $firstName

at line 959
string getLastName()

Return Value

string

at line 967
setLastName(string $lastName)

Parameters

string $lastName

at line 977
string getAddressToString()

Return Value

string

at line 989
User addStatistic(Statistics $statistic)

Add statistic

Parameters

Statistics $statistic

Return Value

User

at line 1000
removeStatistic(Statistics $statistic)

Remove statistic

Parameters

Statistics $statistic

at line 1008
Collection getStatistics()

Get statistics

Return Value

Collection

at line 1016
getTickets()

{@inheritdoc}

at line 1026
array getOrdersWithoutAbandonedCarts()

Retrieve all finished orders sorted by created at

Return Value

array

at line 1050
array getOrderSWithIDasKey()

Return Value

array

at line 1065
setPropertyValue(string $name, mixed $value)

Parameters

string $name
mixed $value

at line 1075
mixed|null getPropertyValue(string $property)

Parameters

string $property

Return Value

mixed|null

at line 1087
addProductToWishList(Product $product)

Adds product to wishlist.

Parameters

Product $product

at line 1095
removeProductFromWishList(Product $product)

Parameters

Product $product

at line 1103
ArrayCollection getWishList()

Return Value

ArrayCollection

at line 1115
setWishList(mixed $wishList)

Parameters

mixed $wishList

at line 1123
addCoupon(Coupon $coupon)

Parameters

Coupon $coupon

at line 1132
removeCoupon(Coupon $coupon)

Parameters

Coupon $coupon

at line 1141
ArrayCollection getCoupons()

Return Value

ArrayCollection

at line 1149
string getFacebookId()

Return Value

string

at line 1159
User setFacebookId(string $facebook_id)

Parameters

string $facebook_id

Return Value

User

at line 1169
string getFacebookAccessToken()

Return Value

string

at line 1179
User setFacebookAccessToken(string $facebook_access_token)

Parameters

string $facebook_access_token

Return Value

User

at line 1189
string getGoogleAccessToken()

Return Value

string

at line 1199
User setGoogleAccessToken(string $google_access_token)

Parameters

string $google_access_token

Return Value

User

at line 1209
string getGoogleId()

Return Value

string

at line 1219
User setGoogleId(string $google_id)

Parameters

string $google_id

Return Value

User

at line 1229
string getTwitterId()

Return Value

string

at line 1239
User setTwitterId(string $twitter_id)

Parameters

string $twitter_id

Return Value

User

at line 1249
string getTwitterAccessToken()

Return Value

string

at line 1259
User setTwitterAccessToken(string $twitter_access_token)

Parameters

string $twitter_access_token

Return Value

User

Return Value

string

Parameters

string $facebookLink

Return Value

User

Return Value

string

Parameters

string $twitterLink

Return Value

User

Return Value

string

Parameters

string $gPlusLink

Return Value

User

at line 1329
bool isGdprConfirmed()

Return Value

bool

at line 1339
User setGdprConfirmed(bool $gdprConfirmed)

Parameters

bool $gdprConfirmed

Return Value

User

at line 1349
string getTitle()

Return Value

string

at line 1359
User setTitle(string $title)

Parameters

string $title

Return Value

User

at line 1369
string getAdditionalInfo()

Return Value

string

at line 1379
User setAdditionalInfo(string $additionalInfo)

Parameters

string $additionalInfo

Return Value

User

at line 1389
string getAdditionalUserInformation()

Return Value

string

at line 1399
User setAdditionalUserInformation(string $additionalUserInformation)

Parameters

string $additionalUserInformation

Return Value

User

at line 1411
User setId(int $id)

Parameters

int $id

Return Value

User

at line 1421
bool isAccountNonLocked()

Return Value

bool

at line 1431
User setLocked(bool $boolean)

Parameters

bool $boolean

Return Value

User

at line 1441
bool isLocked()

Return Value

bool

at line 1449
bool isExpired()

Return Value

bool

at line 1459
User setExpired(bool $expired)

Parameters

bool $expired

Return Value

User

at line 1469
ShippingProvider getDefaultShippingProvider()

Return Value

ShippingProvider

at line 1479
User setDefaultShippingProvider(ShippingProvider|Proxy $defaultShippingProvider)

Parameters

ShippingProvider|Proxy $defaultShippingProvider

Return Value

User

at line 1489
int getDefaultPaymentType()

Return Value

int

at line 1499
User setDefaultPaymentType(string $defaultPaymentType)

Parameters

string $defaultPaymentType

Return Value

User

at line 1509
float getAccountBalance()

Return Value

float

at line 1519
User setAccountBalance(float $accountBalance)

Parameters

float $accountBalance

Return Value

User

at line 1529
float getAccountBalancePlus()

Return Value

float

at line 1539
User setAccountBalancePlus(float $accountBalancePlus)

Parameters

float $accountBalancePlus

Return Value

User

at line 1549
float getAccountBalanceMinus()

Return Value

float

at line 1559
User setAccountBalanceMinus(float $accountBalanceMinus)

Parameters

float $accountBalanceMinus

Return Value

User

at line 1569
bool isB2B()

Return Value

bool

at line 1579
User addUserSpecificPricelist(UserSpecificPricelist $userSpecificPricelist)

Parameters

UserSpecificPricelist $userSpecificPricelist

Return Value

User

at line 1592
User removeUserSpecificPricelist(UserSpecificPricelist $userSpecificPricelist)

Parameters

UserSpecificPricelist $userSpecificPricelist

Return Value

User

at line 1603
ArrayCollection getUserSpecificPricelists()

Return Value

ArrayCollection

at line 1611
array getUserSpecificProductGroups()

Return Value

array

at line 1621
User setUserSpecificProductGroups(array $userSpecificProductGroups)

Parameters

array $userSpecificProductGroups

Return Value

User

at line 1633
User addUserSpecificProductGroup(array $userSpecificProductGroup)

Parameters

array $userSpecificProductGroup

Return Value

User

at line 1643
array getPricelistItemsArray()

Return Value

array

at line 1651
setPricelistItemsArray(array $pricelistItemsArray)

Parameters

array $pricelistItemsArray