QubitProperty
in package
uses
QubitModelTrait
Table of Contents
Constants
- ID = 'property.id'
- NAME = 'property.name'
- OBJECT_ID = 'property.object_id'
- SCOPE = 'property.scope'
- SOURCE_CULTURE = 'property.source_culture'
Methods
- __call() : mixed
- Magic method caller — handles Propel-style getXxx() accessors and i18n field getters with cultureFallback option.
- __get() : mixed
- Magic property access — resolves camelCase to snake_case columns, Propel relationships, and serialized property table values.
- __isset() : bool
- addUnique() : static|null
- Add a property only if it doesn't already exist.
- getAll() : Collection
- Get all rows matching criteria.
- getAncestors() : object
- Get ancestors using MPTT (nested set) lft/rgt columns.
- getById() : static|null
- Load an entity by primary key.
- getByObjectId() : array<string|int, mixed>
- Get all properties for an object.
- getBySlug() : object|null
- Load an entity by slug.
- getChildren() : Collection
- Get children using MPTT parent_id.
- getOne() : object|null
- Get a single row matching criteria.
- getOneByObjectIdAndName() : static|null
- Get one property by object ID and name.
- getTaxonomy() : object|null
- Get taxonomy (for terms).
- getValue() : string|null
- Get the i18n value of this property.
- hydrate() : static
- Hydrate a database row into an instance of the calling class.
Constants
ID
public
mixed
ID
= 'property.id'
NAME
public
mixed
NAME
= 'property.name'
OBJECT_ID
public
mixed
OBJECT_ID
= 'property.object_id'
SCOPE
public
mixed
SCOPE
= 'property.scope'
SOURCE_CULTURE
public
mixed
SOURCE_CULTURE
= 'property.source_culture'
Methods
__call()
Magic method caller — handles Propel-style getXxx() accessors and i18n field getters with cultureFallback option.
public
__call(string $method, array<string|int, mixed> $args) : mixed
Parameters
- $method : string
- $args : array<string|int, mixed>
__get()
Magic property access — resolves camelCase to snake_case columns, Propel relationships, and serialized property table values.
public
__get(string $name) : mixed
Parameters
- $name : string
__isset()
public
__isset(string $name) : bool
Parameters
- $name : string
Return values
booladdUnique()
Add a property only if it doesn't already exist.
public
static addUnique(int $objectId, string $name, string $value[, array<string|int, mixed> $options = [] ]) : static|null
Parameters
- $objectId : int
- $name : string
- $value : string
- $options : array<string|int, mixed> = []
Return values
static|nullgetAll()
Get all rows matching criteria.
public
static getAll([array<string|int, mixed> $criteria = [] ]) : Collection
Parameters
- $criteria : array<string|int, mixed> = []
-
Column => value pairs
Return values
CollectiongetAncestors()
Get ancestors using MPTT (nested set) lft/rgt columns.
public
getAncestors() : object
Returns a fluent collection wrapper that supports andSelf() and orderBy().
Return values
object —Collection-like object with andSelf(), orderBy(), get() methods
getById()
Load an entity by primary key.
public
static getById(int $id[, array<string|int, mixed> $options = [] ]) : static|null
Delegates to EntityQueryService when the class is mapped there, otherwise falls back to a direct table query.
Returns an instance of the calling class so that instanceof checks
work correctly (e.g., $obj instanceof QubitTaxonomy).
Parameters
- $id : int
- $options : array<string|int, mixed> = []
-
Optional. Keys: 'culture' => string
Return values
static|null —Instance of calling class or null
getByObjectId()
Get all properties for an object.
public
static getByObjectId(int $objectId[, array<string|int, mixed> $options = [] ]) : array<string|int, mixed>
Parameters
- $objectId : int
- $options : array<string|int, mixed> = []
-
['scope' => string]
Return values
array<string|int, mixed>getBySlug()
Load an entity by slug.
public
static getBySlug(string $slug[, array<string|int, mixed> $options = [] ]) : object|null
Parameters
- $slug : string
- $options : array<string|int, mixed> = []
-
Optional. Keys: 'culture' => string
Return values
object|nullgetChildren()
Get children using MPTT parent_id.
public
getChildren() : Collection
Return values
CollectiongetOne()
Get a single row matching criteria.
public
static getOne([array<string|int, mixed> $criteria = [] ]) : object|null
Parameters
- $criteria : array<string|int, mixed> = []
-
Column => value pairs
Return values
object|nullgetOneByObjectIdAndName()
Get one property by object ID and name.
public
static getOneByObjectIdAndName(int $objectId, string $name[, array<string|int, mixed> $options = [] ]) : static|null
Parameters
- $objectId : int
- $name : string
- $options : array<string|int, mixed> = []
Return values
static|nullgetTaxonomy()
Get taxonomy (for terms).
public
getTaxonomy() : object|null
Return values
object|nullgetValue()
Get the i18n value of this property.
public
getValue([array<string|int, mixed> $options = [] ]) : string|null
Parameters
- $options : array<string|int, mixed> = []
-
['culture' => string]
Return values
string|nullhydrate()
Hydrate a database row into an instance of the calling class.
public
static hydrate(object $row) : static
Copies all stdClass properties onto a new instance so that
instanceof checks work correctly (e.g., $obj instanceof QubitTaxonomy).
Also resolves the parent property from the MPTT parent_id column
in the object table (Qubit entities inherit from object).
Parameters
- $row : object
-
stdClass from DB query