UserPayment
extends UserPayment
in package
Admin variant of a user payment (`cms_system_user_payment_items`), hydrated from the Api endpoint `api/system/user-payment`. Flat entity (scalar FKs user/tariff/payment).
Attributes
- #[Entity]
- #[Table]
- $name: 'cms_system_user_payment_items'
- #[TableAlias]
- 'userPayment'
Table of Contents
Properties
- $active : bool
- $id : int|null
- $insertDatetime : DateTimeInterface|null
- $insertIp : string|null
- $paymentId : int|null
- $tariffId : int|null
- $userId : int|null
- $validityDatetime : DateTimeInterface|null
Methods
- __construct() : mixed
- callInitMethods() : void
- Calls `init{TraitName}()` for every used trait that defines such a method.
- getActive() : bool
- getAllTraits() : array<string, string>
- Returns all traits the class uses, including those used by parent classes and nested traits.
- getId() : int|null
- getInsertDatetime() : DateTimeInterface|null
- getInsertIp() : string|null
- getPaymentId() : int|null
- getTariffId() : int|null
- getUserId() : int|null
- getValidityDatetime() : DateTimeInterface|null
- isActive() : bool
- isPersisted() : bool
- setActive() : $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
= true
Attributes
- #[Column]
- $type: "boolean"
- $name: "active"
- $options: ["default" => 1]
$id
protected
int|null
$id
= null
Attributes
- #[Column]
- $type: "integer"
- $name: "payment_item_id"
- #[GeneratedValue]
- #[Id]
$insertDatetime
protected
DateTimeInterface|null
$insertDatetime
= null
Attributes
- #[Column]
- $type: "datetime"
- $name: "insert_datetime"
$insertIp
protected
string|null
$insertIp
= null
Attributes
- #[Column]
- $type: "string"
- $length: 45
- $name: "insert_ip"
- $nullable: true
- #[PersonalData]
- PersonalDataKind::Hidden
$paymentId
protected
int|null
$paymentId
= null
Attributes
- #[Column]
- $type: "integer"
- $name: "cms_system_payments_payment_id"
- $nullable: true
$tariffId
protected
int|null
$tariffId
= null
Attributes
- #[Column]
- $type: "integer"
- $name: "cms_system_user_tariffs_user_tariff_id"
- $nullable: true
$userId
protected
int|null
$userId
= null
Attributes
- #[Column]
- $type: "integer"
- $name: "cms_system_users_user_id"
- $nullable: true
$validityDatetime
protected
DateTimeInterface|null
$validityDatetime
= null
Attributes
- #[Column]
- $type: "datetime"
- $name: "validity_datetime"
- $nullable: true
Methods
__construct()
public
__construct([int|null $id = null ][, int|null $userId = null ][, int|null $tariffId = null ][, int|null $paymentId = null ][, DateTimeInterface|null $validityDatetime = null ][, DateTimeInterface|null $insertDatetime = null ][, string|null $insertIp = null ][, bool $active = true ]) : mixed
Parameters
- $id : int|null = null
- $userId : int|null = null
- $tariffId : int|null = null
- $paymentId : int|null = null
- $validityDatetime : DateTimeInterface|null = null
- $insertDatetime : DateTimeInterface|null = null
- $insertIp : string|null = null
- $active : bool = true
callInitMethods()
Calls `init{TraitName}()` for every used trait that defines such a method.
public
callInitMethods() : void
getActive()
public
getActive() : bool
Return values
boolgetAllTraits()
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>getId()
public
getId() : int|null
Return values
int|nullgetInsertDatetime()
public
getInsertDatetime() : DateTimeInterface|null
Return values
DateTimeInterface|nullgetInsertIp()
public
getInsertIp() : string|null
Return values
string|nullgetPaymentId()
public
getPaymentId() : int|null
Return values
int|nullgetTariffId()
public
getTariffId() : int|null
Return values
int|nullgetUserId()
public
getUserId() : int|null
Return values
int|nullgetValidityDatetime()
public
getValidityDatetime() : DateTimeInterface|null
Return values
DateTimeInterface|nullisActive()
public
isActive() : bool
Return values
boolisPersisted()
public
isPersisted() : bool
Return values
boolsetActive()
public
setActive(bool $active) : $this
Parameters
- $active : bool
Return values
$thissetId()
public
setId(int|null $id) : $this
Parameters
- $id : int|null
Return values
$thissetInsertDatetime()
public
setInsertDatetime(DateTimeInterface $insertDatetime) : $this
Parameters
- $insertDatetime : DateTimeInterface
Return values
$thissetInsertIp()
public
setInsertIp(string|null $insertIp) : $this
Parameters
- $insertIp : string|null
Return values
$thissetPaymentId()
public
setPaymentId(int|null $paymentId) : $this
Parameters
- $paymentId : int|null
Return values
$thissetTariffId()
public
setTariffId(int|null $tariffId) : $this
Parameters
- $tariffId : int|null
Return values
$thissetUserId()
public
setUserId(int $userId) : $this
Parameters
- $userId : int
Return values
$thissetValidityDatetime()
public
setValidityDatetime(DateTimeInterface|null $validityDatetime) : $this
Parameters
- $validityDatetime : DateTimeInterface|null
Return values
$thisgetTraitsRecursive()
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>