VuFind API Documentation

UserList extends RowGateway
in package
implements DbTableAwareInterface, UserListEntityInterface, DbServiceAwareInterface Uses DbTableAwareTrait, DbServiceAwareTrait

Row Definition for user_list

Tags
category

VuFind

author

Demian Katz demian.katz@villanova.edu

license

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

link

Main Site

Interfaces, Classes, Traits and Enums

DbTableAwareInterface
Marker interface for classes that depend on the \VuFind\Db\Table\PluginManager
UserListEntityInterface
Entity model interface for user_list table
DbServiceAwareInterface
Marker interface for classes that depend on the \VuFind\Db\Service\PluginManager

Table of Contents

$created  : string
$description  : string
$id  : int
$public  : bool
$title  : string
$user_id  : int
$dbServiceManager  : PluginManager
Database service plugin manager
$session  : Container|null
$tableManager  : PluginManager
Database table plugin manager
$tagsService  : TagsService
__construct()  : mixed
Constructor
addListTag()  : void
Add a tag to the list.
delete()  : int
Destroy the list.
editAllowed()  : bool
Is the current user allowed to edit this list?
getCreated()  : DateTime
Get created date.
getDbService()  : T
Get a database service object.
getDbServiceManager()  : PluginManager
Get the service plugin manager. Throw an exception if it is missing.
getDbTable()  : Gateway
Get a database table object.
getDbTableManager()  : PluginManager
Get the table plugin manager. Throw an exception if it is missing.
getDescription()  : string|null
Get description.
getId()  : int|null
Get identifier (returns null for an uninitialized or non-persisted object).
getListTags()  : array<string|int, mixed>
Get an array of tags assigned to this list.
getPrimaryKeyColumn()  : array<string|int, mixed>
Retrieve primary key information.
getResourceTags()  : array<string|int, mixed>
Get an array of resource tags associated with this list.
getTitle()  : string
Get title.
getUser()  : UserEntityInterface|null
Get user.
isPublic()  : bool
Is this a public list?
rememberLastUsed()  : void
Remember that this list was used so that it can become the default in dialog boxes.
removeResourcesById()  : void
Given an array of item ids, remove them from all lists.
setCreated()  : UserListEntityInterface
Set created date.
setDbServiceManager()  : void
Set the service plugin manager.
setDbTableManager()  : void
Set the table plugin manager.
setDescription()  : UserListEntityInterface
Set description.
setPublic()  : UserListEntityInterface
Set whether the list is public.
setSession()  : void
Set session container.
setTitle()  : UserListEntityInterface
Set title.
setUser()  : UserListEntityInterface
Set user.

Properties

$session

protected Container|null $session = null

Methods

__construct()

Constructor

public __construct(Adapter $adapter, TagsService $tagsService[, Container|null $session = null ]) : mixed
Parameters
$adapter : Adapter

Database adapter

$tagsService : TagsService

Tags service

$session : Container|null = null

Session container for last list information

Return values
mixed

addListTag()

Add a tag to the list.

public addListTag(string $tagText, UserEntityInterface $user) : void
Parameters
$tagText : string

The tag to save.

$user : UserEntityInterface

The user posting the tag.

Tags
deprecated

Use \VuFind\Favorites\FavoritesService::addListTag()

Return values
void

delete()

Destroy the list.

public delete([User|bool $user = false ][, bool $force = false ]) : int
Parameters
$user : User|bool = false

Logged-in user (false if none)

$force : bool = false

Should we force the delete without checking permissions?

Tags
deprecated

Use \VuFind\Favorites\FavoritesService::destroyList()

Return values
int

The number of rows deleted.

editAllowed()

Is the current user allowed to edit this list?

public editAllowed(UserEntityInterface|null $user) : bool
Parameters
$user : UserEntityInterface|null

Logged-in user (null if none)

Tags
deprecated

Use \VuFind\Favorites\FavoritesService::userCanEditList()

Return values
bool

getCreated()

Get created date.

public getCreated() : DateTime
Return values
DateTime

getDbService()

Get a database service object.

public getDbService(class-string<\VuFind\Db\Service\T> $name) : T
Parameters
$name : class-string<\VuFind\Db\Service\T>

Name of service to retrieve

Tags
template

T

Return values
T

getDbTable()

Get a database table object.

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

Table to load.

Return values
Gateway

getDescription()

Get description.

public getDescription() : string|null
Return values
string|null

getId()

Get identifier (returns null for an uninitialized or non-persisted object).

public getId() : int|null
Return values
int|null

getListTags()

Get an array of tags assigned to this list.

public getListTags() : array<string|int, mixed>
Tags
deprecated

Use TagServiceInterface::getListTags()

Return values
array<string|int, mixed>

getPrimaryKeyColumn()

Retrieve primary key information.

public getPrimaryKeyColumn() : array<string|int, mixed>
Return values
array<string|int, mixed>

getResourceTags()

Get an array of resource tags associated with this list.

public getResourceTags() : array<string|int, mixed>
Return values
array<string|int, mixed>

getTitle()

Get title.

public getTitle() : string
Return values
string

isPublic()

Is this a public list?

public isPublic() : bool
Return values
bool

rememberLastUsed()

Remember that this list was used so that it can become the default in dialog boxes.

public rememberLastUsed() : void
Tags
deprecated

Use \VuFind\Favorites\FavoritesService::rememberLastUsedList()

Return values
void

removeResourcesById()

Given an array of item ids, remove them from all lists.

public removeResourcesById(UserEntityInterface|bool $user, array<string|int, mixed> $ids[, string $source = DEFAULT_SEARCH_BACKEND ]) : void
Parameters
$user : UserEntityInterface|bool

Logged-in user (false if none)

$ids : array<string|int, mixed>

IDs to remove from the list

$source : string = DEFAULT_SEARCH_BACKEND

Type of resource identified by IDs

Tags
deprecated

Use \VuFind\Favorites\FavoritesService::removeListResourcesById()

Return values
void

setSession()

Set session container.

public setSession(Container $session) : void
Parameters
$session : Container

Session container

Return values
void

Search results