ActorRepository
extends Repository
in package
Repository for actor (authority record) table.
Used by Authority Record reports.
Tags
Table of Contents
Methods
- all() : Collection
- Get all records from the table.
- count() : int
- Count records matching criteria.
- countByEntityType() : array<string|int, mixed>
- Count actors by entity type.
- create() : int
- Create a new record and return its ID.
- delete() : bool
- Delete a record by ID.
- exists() : bool
- Check if a record exists.
- find() : array<string|int, mixed>|null
- Find a single record by ID.
- findByEntityType() : Collection
- Find actors by entity type (Person, Corporate body, Family).
- findByInformationObject() : Collection
- Find actors related to specific information objects.
- findWhere() : Collection
- Find all records matching criteria.
- findWithContacts() : array<string|int, mixed>|null
- Get actor with contacts.
- findWithI18n() : array<string|int, mixed>|null
- Find actors with i18n data.
- getAllByType() : Collection
- Get all actors of a specific type (for dropdowns).
- getBindings() : array<int, mixed>
- Get bindings for debugging.
- getContacts() : Collection
- Get contact information for an actor.
- getPrimaryContact() : object|null
- Get primary contact for an actor.
- getRepositories() : Collection
- Get actors that are repositories.
- hasContacts() : bool
- Check if actor has contacts.
- paginate() : array<string|int, mixed>
- Find records with pagination support.
- reportQuery() : Builder
- Get base query with standard joins for authority record reports.
- searchByName() : Collection
- Search actors by authorized form of name.
- toSql() : string
- Get SQL query string for debugging.
- update() : bool
- Update a record by ID.
Methods
all()
Get all records from the table.
public
all() : Collection
Return values
Collectioncount()
Count records matching criteria.
public
count([array<string, mixed> $criteria = [] ]) : int
Parameters
- $criteria : array<string, mixed> = []
Return values
intcountByEntityType()
Count actors by entity type.
public
countByEntityType() : array<string|int, mixed>
Return values
array<string|int, mixed>create()
Create a new record and return its ID.
public
create(array<string, mixed> $data) : int
Parameters
- $data : array<string, mixed>
Return values
intdelete()
Delete a record by ID.
public
delete(int $id) : bool
Parameters
- $id : int
Return values
boolexists()
Check if a record exists.
public
exists(array<string, mixed> $criteria) : bool
Parameters
- $criteria : array<string, mixed>
Return values
boolfind()
Find a single record by ID.
public
find(int $id) : array<string|int, mixed>|null
Parameters
- $id : int
Return values
array<string|int, mixed>|nullfindByEntityType()
Find actors by entity type (Person, Corporate body, Family).
public
findByEntityType(int $entityTypeId) : Collection
Parameters
- $entityTypeId : int
Return values
CollectionfindByInformationObject()
Find actors related to specific information objects.
public
findByInformationObject(int $objectId) : Collection
Parameters
- $objectId : int
Return values
CollectionfindWhere()
Find all records matching criteria.
public
findWhere(array<string, mixed> $criteria) : Collection
Parameters
- $criteria : array<string, mixed>
Return values
CollectionfindWithContacts()
Get actor with contacts.
public
findWithContacts(int $id[, string $culture = 'en' ]) : array<string|int, mixed>|null
Parameters
- $id : int
- $culture : string = 'en'
Return values
array<string|int, mixed>|nullfindWithI18n()
Find actors with i18n data.
public
findWithI18n(int $id[, string $culture = 'en' ]) : array<string|int, mixed>|null
Parameters
- $id : int
- $culture : string = 'en'
Return values
array<string|int, mixed>|nullgetAllByType()
Get all actors of a specific type (for dropdowns).
public
getAllByType(int $entityTypeId) : Collection
Parameters
- $entityTypeId : int
Return values
CollectiongetBindings()
Get bindings for debugging.
public
getBindings(Builder $query) : array<int, mixed>
Parameters
- $query : Builder
Return values
array<int, mixed>getContacts()
Get contact information for an actor.
public
getContacts(int $actorId) : Collection
Parameters
- $actorId : int
Return values
CollectiongetPrimaryContact()
Get primary contact for an actor.
public
getPrimaryContact(int $actorId) : object|null
Parameters
- $actorId : int
Return values
object|nullgetRepositories()
Get actors that are repositories.
public
getRepositories() : Collection
Return values
CollectionhasContacts()
Check if actor has contacts.
public
hasContacts(int $actorId) : bool
Parameters
- $actorId : int
Return values
boolpaginate()
Find records with pagination support.
public
paginate([array<string, mixed> $criteria = [] ][, int $perPage = 15 ][, int $page = 1 ]) : array<string|int, mixed>
Parameters
- $criteria : array<string, mixed> = []
- $perPage : int = 15
- $page : int = 1
Return values
array<string|int, mixed>reportQuery()
Get base query with standard joins for authority record reports.
public
reportQuery() : Builder
Return values
BuildersearchByName()
Search actors by authorized form of name.
public
searchByName(string $searchTerm[, int $limit = 50 ]) : Collection
Parameters
- $searchTerm : string
- $limit : int = 50
Return values
CollectiontoSql()
Get SQL query string for debugging.
public
toSql(Builder $query) : string
Parameters
- $query : Builder
Return values
stringupdate()
Update a record by ID.
public
update(int $id, array<string, mixed> $data) : bool
Parameters
- $id : int
- $data : array<string, mixed>