VuFind API Documentation

UserListService extends AbstractDbService
in package
implements DbTableAwareInterface, UserListServiceInterface Uses DbTableAwareTrait

Database service for UserList.

Tags
category

VuFind

author

Sudharma Kellampalli skellamp@villanova.edu

author

Demian Katz demian.katz@villanova.edu

license

http://opensource.org/licenses/gpl-2.0.php GNU General Public License

link

Wiki

Interfaces, Classes, Traits and Enums

DbTableAwareInterface
Marker interface for classes that depend on the \VuFind\Db\Table\PluginManager
UserListServiceInterface
Database service interface for UserList.

Table of Contents

$tableManager  : PluginManager
Database table plugin manager
createEntity()  : UserListEntityInterface
Create a UserList entity object.
deleteUserList()  : void
Delete a user list entity.
getDbTable()  : Gateway
Get a database table object.
getDbTableManager()  : PluginManager
Get the table plugin manager. Throw an exception if it is missing.
getListsContainingRecord()  : array<string|int, UserListEntityInterface>
Get lists containing a specific record.
getPublicLists()  : array<string|int, UserListEntityInterface>
Get public lists.
getUserListById()  : UserListEntityInterface
Retrieve a list object.
getUserListsAndCountsByUser()  : array<string|int, mixed>
Get lists belonging to the user and their count. Returns an array of arrays with list_entity and count keys.
getUserListsByTagAndId()  : array<string|int, UserListEntityInterface>
Get lists associated with a particular tag and/or list of IDs. If IDs and tags are both provided, only the intersection of matches will be returned.
getUserListsByUser()  : array<string|int, UserListEntityInterface>
Get list objects belonging to the specified user.
persistEntity()  : void
Persist an entity.
setDbTableManager()  : void
Set the table plugin manager.

Properties

Methods

getDbTable()

Get a database table object.

public getDbTable(string $table) : Gateway
Parameters
$table : string

Table to load.

Return values
Gateway

getListsContainingRecord()

Get lists containing a specific record.

public getListsContainingRecord(string $recordId[, string $source = DEFAULT_SEARCH_BACKEND ][, UserEntityInterface|int|null $userOrId = null ]) : array<string|int, UserListEntityInterface>
Parameters
$recordId : string

ID of record being checked.

$source : string = DEFAULT_SEARCH_BACKEND

Source of record to look up

$userOrId : UserEntityInterface|int|null = null

Optional user ID or entity object (to limit results to a particular user).

Return values
array<string|int, UserListEntityInterface>

getPublicLists()

Get public lists.

public getPublicLists([array<string|int, mixed> $includeFilter = [] ][, array<string|int, mixed> $excludeFilter = [] ]) : array<string|int, UserListEntityInterface>
Parameters
$includeFilter : array<string|int, mixed> = []

List of list ids or entities to include in result.

$excludeFilter : array<string|int, mixed> = []

List of list ids or entities to exclude from result.

Return values
array<string|int, UserListEntityInterface>

getUserListsAndCountsByUser()

Get lists belonging to the user and their count. Returns an array of arrays with list_entity and count keys.

public getUserListsAndCountsByUser(UserEntityInterface|int $userOrId) : array<string|int, mixed>
Parameters
$userOrId : UserEntityInterface|int

User entity object or ID

Tags
throws
Exception
Return values
array<string|int, mixed>

getUserListsByTagAndId()

Get lists associated with a particular tag and/or list of IDs. If IDs and tags are both provided, only the intersection of matches will be returned.

public getUserListsByTagAndId([string|array<string|int, string>|null $tag = null ][, int|array<string|int, int>|null $listId = null ][, bool $publicOnly = true ][, bool $andTags = true ][, bool $caseSensitiveTags = false ]) : array<string|int, UserListEntityInterface>
Parameters
$tag : string|array<string|int, string>|null = null

Tag or tags to match (by text, not ID; null for all)

$listId : int|array<string|int, int>|null = null

List ID or IDs to match (null for all)

$publicOnly : bool = true

Whether to return only public lists

$andTags : bool = true

Use AND operator when filtering by tag.

$caseSensitiveTags : bool = false

Should we treat tags case-sensitively?

Return values
array<string|int, UserListEntityInterface>

Search results