QubitRepository
in package
uses
QubitModelTrait
Table of Contents
Constants
- DESC_DETAIL_ID = 'repository.desc_detail_id'
- DESC_STATUS_ID = 'repository.desc_status_id'
- ID = 'repository.id'
- IDENTIFIER = 'repository.identifier'
- ROOT_ID = 6
- SOURCE_CULTURE = 'repository.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
- existsBanner() : bool
- Check if repository has a banner image.
- existsLogo() : bool
- Check if repository has a logo image.
- getAll() : Collection
- Get all rows matching criteria.
- getAncestors() : object
- Get ancestors using MPTT (nested set) lft/rgt columns.
- getBannerPath() : string
- Get banner image path.
- getById() : static|null
- Load an entity by primary key.
- getBySlug() : object|null
- Load an entity by slug.
- getChildren() : Collection
- Get children using MPTT parent_id.
- getCity() : string|null
- Get city from primary contact.
- getCountry() : string|null
- Get formatted country name from primary contact's country code.
- getCountryCode() : string|null
- Get country code from primary contact.
- getLogoPath() : string
- Get logo image path.
- getOne() : object|null
- Get a single row matching criteria.
- getRegion() : string|null
- Get region from primary contact.
- getRoot() : mixed
- getTaxonomy() : object|null
- Get taxonomy (for terms).
- getUploadsPath() : string
- Get the uploads path for this repository.
- hydrate() : static
- Hydrate a database row into an instance of the calling class.
Constants
DESC_DETAIL_ID
public
mixed
DESC_DETAIL_ID
= 'repository.desc_detail_id'
DESC_STATUS_ID
public
mixed
DESC_STATUS_ID
= 'repository.desc_status_id'
ID
public
mixed
ID
= 'repository.id'
IDENTIFIER
public
mixed
IDENTIFIER
= 'repository.identifier'
ROOT_ID
public
mixed
ROOT_ID
= 6
SOURCE_CULTURE
public
mixed
SOURCE_CULTURE
= 'repository.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
boolexistsBanner()
Check if repository has a banner image.
public
existsBanner() : bool
Return values
boolexistsLogo()
Check if repository has a logo image.
public
existsLogo() : bool
Return values
boolgetAll()
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
getBannerPath()
Get banner image path.
public
getBannerPath([bool $absolute = false ]) : string
Parameters
- $absolute : bool = false
-
Return absolute filesystem path if true
Return values
stringgetById()
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
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
CollectiongetCity()
Get city from primary contact.
public
getCity([array<string|int, mixed> $options = [] ]) : string|null
Parameters
- $options : array<string|int, mixed> = []
-
Options
Return values
string|nullgetCountry()
Get formatted country name from primary contact's country code.
public
getCountry() : string|null
Return values
string|nullgetCountryCode()
Get country code from primary contact.
public
getCountryCode([array<string|int, mixed> $options = [] ]) : string|null
Parameters
- $options : array<string|int, mixed> = []
-
Options
Return values
string|nullgetLogoPath()
Get logo image path.
public
getLogoPath([bool $absolute = false ]) : string
Parameters
- $absolute : bool = false
-
Return absolute filesystem path if true
Return values
stringgetOne()
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|nullgetRegion()
Get region from primary contact.
public
getRegion([array<string|int, mixed> $options = [] ]) : string|null
Parameters
- $options : array<string|int, mixed> = []
-
Options
Return values
string|nullgetRoot()
public
static getRoot() : mixed
getTaxonomy()
Get taxonomy (for terms).
public
getTaxonomy() : object|null
Return values
object|nullgetUploadsPath()
Get the uploads path for this repository.
public
getUploadsPath([bool $absolute = false ]) : string
Parameters
- $absolute : bool = false
-
Return absolute filesystem path if true
Return values
stringhydrate()
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