CoolCMS API

PaymentItem extends BaseEntity
in package
implements IdentifiableInterface uses IdentifiableTrait

AbstractYes
Tags
template
Attributes
#[MappedSuperclass]
#[TableAlias]
$alias: 'paymentItem'

Table of Contents

Interfaces

IdentifiableInterface
Entity with a simple integer primary key. Most entities have one (often via {@see \App\Core\Traits\Shared\Models\Entities\IdentifiableTrait}); texts and links with a composite key do not, which is why `getId()` is not on {@see \App\Core\Base\BaseEntity}. Code that needs the id of a generic entity asks for this interface (parameter type, template bound, `instanceof`).

Properties

$active  : bool
$advert  : TAdvert|null
$advertId  : int
$categoryId  : int|null
$id  : int|null
$insertDatetime  : DateTime
$insertIp  : string|null
$paymentId  : int|null
$tariffId  : int|null
$userId  : int|null
$validityDatetime  : DateTime|null

Methods

__construct()  : mixed
callInitMethods()  : void
Calls `init{TraitName}()` for every used trait that defines such a method.
getActive()  : bool
getAdvert()  : TAdvert|null
getAdvertId()  : int
getAllTraits()  : array<string, string>
Returns all traits the class uses, including those used by parent classes and nested traits.
getCategoryId()  : int|null
getId()  : int|null
getInsertDatetime()  : DateTime
getInsertIp()  : string|null
getPaymentId()  : int|null
getTariffId()  : int|null
getUserId()  : int|null
getValidityDatetime()  : DateTime|null
isActive()  : bool
isExpired()  : bool
Check if payment item has expired
isPersisted()  : bool
isValid()  : bool
Check if payment item is still valid
setActive()  : $this
setAdvert()  : $this
setAdvertId()  : $this
setCategoryId()  : $this
setId()  : $this
setInsertDatetime()  : $this
setInsertIp()  : $this
setPaymentId()  : $this
setTariffId()  : $this
setUserId()  : $this
setValidityDatetime()  : $this
getTraitsRecursive()  : array<string, string>
Walks the trait list recursively and collects nested traits too.

Properties

$active

protected bool $active = false
Attributes
#[Column]
$name: 'active'
$type: 'boolean'

$advertId

protected int $advertId = 0
Attributes
#[Column]
$name: 'cms_mod_comcat_adverts_advert_id'
$type: 'integer'
$options: ['unsigned' => true]

$categoryId

protected int|null $categoryId = null
Attributes
#[Column]
$name: 'cms_mod_comcat_categories_category_id'
$type: 'integer'
$nullable: true
$options: ['unsigned' => true]

$id

protected int|null $id = null
Attributes
#[Column]
$name: 'payment_item_id'
$type: 'integer'
$options: ['unsigned' => true]
#[GeneratedValue]
#[Id]

$insertDatetime

protected DateTime $insertDatetime = new DateTime()
Attributes
#[Column]
$name: 'insert_datetime'
$type: 'datetime'
#[ExternalReadonly]

$insertIp

protected string|null $insertIp = null
Attributes
#[Column]
$name: 'insert_ip'
$type: 'string'
$length: 45
$nullable: true
#[ExternalReadonly]
#[PersonalData]
PersonalDataKind::Hidden

$paymentId

protected int|null $paymentId = null
Attributes
#[Column]
$name: 'cms_system_payments_payment_id'
$type: 'integer'
$nullable: true
$options: ['unsigned' => true]

$tariffId

protected int|null $tariffId = null
Attributes
#[Column]
$name: 'cms_mod_comcat_advert_tariffs_advert_tariff_id'
$type: 'integer'
$nullable: true
$options: ['unsigned' => true]

$userId

protected int|null $userId = null
Attributes
#[Column]
$name: 'cms_system_users_user_id'
$type: 'integer'
$nullable: true
$options: ['unsigned' => true]
#[ExternalReadonly]

$validityDatetime

protected DateTime|null $validityDatetime = null
Attributes
#[Column]
$name: 'validity_datetime'
$type: 'datetime'
$nullable: true
#[ExternalReadonly]

Methods

__construct()

public __construct([int|null $id = null ][, int $advertId = 0 ][, int|null $tariffId = null ][, int|null $categoryId = null ][, int|null $paymentId = null ][, int|null $userId = null ][, DateTime|null $validityDatetime = null ][, DateTime $insertDatetime = new DateTime() ][, string|null $insertIp = null ][, bool $active = false ][, mixed $advert = null ]) : mixed
Parameters
$id : int|null = null
$advertId : int = 0
$tariffId : int|null = null
$categoryId : int|null = null
$paymentId : int|null = null
$userId : int|null = null
$validityDatetime : DateTime|null = null
$insertDatetime : DateTime = new DateTime()
$insertIp : string|null = null
$active : bool = false
$advert : mixed = null

callInitMethods()

Calls `init{TraitName}()` for every used trait that defines such a method.

public callInitMethods() : void

getActive()

public getActive() : bool
Return values
bool

getAdvert()

public getAdvert() : TAdvert|null
Return values
TAdvert|null

getAdvertId()

public getAdvertId() : int
Return values
int

getAllTraits()

Returns all traits the class uses, including those used by parent classes and nested traits.

public getAllTraits() : array<string, string>
Return values
array<string, string>

getCategoryId()

public getCategoryId() : int|null
Return values
int|null

getInsertDatetime()

public getInsertDatetime() : DateTime
Return values
DateTime

getInsertIp()

public getInsertIp() : string|null
Return values
string|null

getPaymentId()

public getPaymentId() : int|null
Return values
int|null

getTariffId()

public getTariffId() : int|null
Return values
int|null

getUserId()

public getUserId() : int|null
Return values
int|null

getValidityDatetime()

public getValidityDatetime() : DateTime|null
Return values
DateTime|null

isActive()

public isActive() : bool
Return values
bool

isExpired()

Check if payment item has expired

public isExpired() : bool
Return values
bool

isValid()

Check if payment item is still valid

public isValid() : bool
Return values
bool

setActive()

public setActive(bool $active) : $this
Parameters
$active : bool
Return values
$this

setAdvert()

public setAdvert(TAdvert|null $advert) : $this
Parameters
$advert : TAdvert|null
Return values
$this

setAdvertId()

public setAdvertId(int $advertId) : $this
Parameters
$advertId : int
Return values
$this

setCategoryId()

public setCategoryId(int|null $categoryId) : $this
Parameters
$categoryId : int|null
Return values
$this

setId()

public setId(int|null $id) : $this
Parameters
$id : int|null
Return values
$this

setInsertDatetime()

public setInsertDatetime(DateTime $insertDatetime) : $this
Parameters
$insertDatetime : DateTime
Return values
$this

setInsertIp()

public setInsertIp(string|null $insertIp) : $this
Parameters
$insertIp : string|null
Return values
$this

setPaymentId()

public setPaymentId(int|null $paymentId) : $this
Parameters
$paymentId : int|null
Return values
$this

setTariffId()

public setTariffId(int|null $tariffId) : $this
Parameters
$tariffId : int|null
Return values
$this

setUserId()

public setUserId(int|null $userId) : $this
Parameters
$userId : int|null
Return values
$this

setValidityDatetime()

public setValidityDatetime(DateTime|null $validityDatetime) : $this
Parameters
$validityDatetime : DateTime|null
Return values
$this

getTraitsRecursive()

Walks the trait list recursively and collects nested traits too.

private static getTraitsRecursive(array<string, string> $traits) : array<string, string>
Parameters
$traits : array<string, string>
Return values
array<string, string>
On this page

Search results