class Thread extends AbstractModel

Class Thread

Properties

int $id from AbstractModel
int $userId
User $user
int $orderId
Order $order
int $productId
Product $product
int $statusId
State $status
string $token
int $contactId
Contact $contact
string $language
string $email
int $shopId

Methods

static  null|AbstractModel
getById($id)

Get Range by id.

static  boolean
isMultiShop()

No description

static  boolean
isMultiShopFK()

No description

static  AbstractModel
create()

Create new instance of Pimcore Object.

static  AbstractModel|null
getByShopId($id, null $shopId = null)

No description

static  null|AbstractModel
getByField( string $field, string $value, int $shopId = null)

Get Range by id.

static  AbstractListing
getList()

get listing class.

static  AbstractModel[]
getAll()

Get all objects form this type.

int
getId()

No description

setId( int $id)

No description

string
getCacheKey()

No description

save()

save model to database.

bool
delete()

delete model.

getLocalizedFields()

Get LocalizedFields Provider.

setLocalizedFields($localizedFields)

Get LocalizedFields Provider.

AbstractModel
setValue($key, $value)

Override setValue function to support localized fields.

string
__toString()

No description

array
__sleep()

Prepare object to goto sleep.

__wakeup()

Prepare object to wakeup.

static  Thread[]|Thread|null
searchThread($email, $contactId, $shopId, $orderId = null, $productId = null, $getAll = false)

Get Open threads by email.

createMessage($messageText)

Create a new message for thread.

getMessages()

Get all messages.

int
getUserId()

No description

setUserId( int $userId)

No description

getUser()

No description

setUser( User $user)

No description

int
getOrderId()

No description

setOrderId( int $orderId)

No description

getOrder()

No description

setOrder( Order $order)

No description

int
getProductId()

No description

setProductId( int $productId)

No description

getProduct()

No description

setProduct( Product $product)

No description

int
getStatusId()

No description

setStatusId( int $statusId)

No description

getStatus()

No description

setStatus( State $status)

No description

string
getToken()

No description

setToken( string $token)

No description

int
getContactId()

No description

setContactId( int $contactId)

No description

getContact()

No description

setContact( Contact $contact)

No description

string
getLanguage()

No description

setLanguage( string $language)

No description

string
getEmail()

No description

setEmail( string $email)

No description

int
getShopId()

No description

setShopId( int $shopId)

No description

Details

in AbstractModel at line line 72
static null|AbstractModel getById($id)

Get Range by id.

Parameters

$id

Return Value

null|AbstractModel

in AbstractModel at line line 80
static boolean isMultiShop()

Return Value

boolean

in AbstractModel at line line 94
static boolean isMultiShopFK()

Return Value

boolean

in AbstractModel at line line 112
static AbstractModel create()

Create new instance of Pimcore Object.

Return Value

AbstractModel

Exceptions

Exception

in AbstractModel at line line 122
static AbstractModel|null getByShopId($id, null $shopId = null)

Parameters

$id
null $shopId

Return Value

AbstractModel|null

in AbstractModel at line line 170
static null|AbstractModel getByField( string $field, string $value, int $shopId = null)

Get Range by id.

Parameters

string $field
string $value
int $shopId

Return Value

null|AbstractModel

in AbstractModel at line line 223
static AbstractListing getList()

get listing class.

Return Value

AbstractListing

Exceptions

Exception

in AbstractModel at line line 243
static AbstractModel[] getAll()

Get all objects form this type.

Return Value

AbstractModel[]

in AbstractModel at line line 253
int getId()

Return Value

int

in AbstractModel at line line 261
setId( int $id)

Parameters

int $id

in AbstractModel at line line 269
string getCacheKey()

Return Value

string

in AbstractModel at line line 277
save()

save model to database.

in AbstractModel at line line 294
bool delete()

delete model.

Return Value

bool

in AbstractModel at line line 310
LocalizedFields|null getLocalizedFields()

Get LocalizedFields Provider.

Return Value

LocalizedFields|null

in AbstractModel at line line 329
setLocalizedFields($localizedFields)

Get LocalizedFields Provider.

Parameters

$localizedFields

in AbstractModel at line line 342
AbstractModel setValue($key, $value)

Override setValue function to support localized fields.

Parameters

$key
$value

Return Value

AbstractModel

at line line 188
string __toString()

Return Value

string

in AbstractModel at line line 370
array __sleep()

Prepare object to goto sleep.

Return Value

array

in AbstractModel at line line 390
__wakeup()

Prepare object to wakeup.

at line line 112
static Thread[]|Thread|null searchThread($email, $contactId, $shopId, $orderId = null, $productId = null, $getAll = false)

Get Open threads by email.

Parameters

$email string
$contactId int
$shopId int
$orderId int|null
$productId int|null
$getAll boolean Gets all Threads, no matter if finished or orderId/productId is set

Return Value

Thread[]|Thread|null

at line line 161
Message createMessage($messageText)

Create a new message for thread.

Parameters

$messageText string

Return Value

Message

Exceptions

Exception

at line line 177
Message[] getMessages()

Get all messages.

Return Value

Message[]

at line line 196
int getUserId()

Return Value

int

at line line 204
setUserId( int $userId)

Parameters

int $userId

at line line 212
User getUser()

Return Value

User

at line line 226
setUser( User $user)

Parameters

User $user

Exceptions

Exception

at line line 239
int getOrderId()

Return Value

int

at line line 247
setOrderId( int $orderId)

Parameters

int $orderId

at line line 255
Order getOrder()

Return Value

Order

at line line 269
setOrder( Order $order)

Parameters

Order $order

Exceptions

Exception

at line line 282
int getProductId()

Return Value

int

at line line 290
setProductId( int $productId)

Parameters

int $productId

at line line 298
Product getProduct()

Return Value

Product

at line line 312
setProduct( Product $product)

Parameters

Product $product

Exceptions

Exception

at line line 325
int getStatusId()

Return Value

int

at line line 333
setStatusId( int $statusId)

Parameters

int $statusId

at line line 341
State getStatus()

Return Value

State

at line line 355
setStatus( State $status)

Parameters

State $status

Exceptions

Exception

at line line 368
string getToken()

Return Value

string

at line line 376
setToken( string $token)

Parameters

string $token

at line line 384
int getContactId()

Return Value

int

at line line 392
setContactId( int $contactId)

Parameters

int $contactId

at line line 400
Contact getContact()

Return Value

Contact

at line line 414
setContact( Contact $contact)

Parameters

Contact $contact

Exceptions

Exception

at line line 427
string getLanguage()

Return Value

string

at line line 435
setLanguage( string $language)

Parameters

string $language

at line line 443
string getEmail()

Return Value

string

at line line 451
setEmail( string $email)

Parameters

string $email

at line line 459
int getShopId()

Return Value

int

at line line 467
setShopId( int $shopId)

Parameters

int $shopId