UserList
extends RowGateway
in package
implements
DbTableAwareInterface, UserListEntityInterface, DbServiceAwareInterface
Uses
DbTableAwareTrait, DbServiceAwareTrait
Row Definition for user_list
Tags
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
$created
public
string
$created
$description
public
string
$description
$id
public
int
$id
$public
public
bool
$public
$title
public
string
$title
$user_id
public
int
$user_id
$dbServiceManager
Database service plugin manager
protected
PluginManager
$dbServiceManager
$session
protected
Container|null
$session
= null
$tableManager
Database table plugin manager
protected
PluginManager
$tableManager
$tagsService
protected
TagsService
$tagsService
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
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
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
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
Return values
T —getDbServiceManager()
Get the service plugin manager. Throw an exception if it is missing.
public
getDbServiceManager() : PluginManager
Tags
Return values
PluginManager —getDbTable()
Get a database table object.
public
getDbTable(string $table) : Gateway
Parameters
- $table : string
-
Table to load.
Return values
Gateway —getDbTableManager()
Get the table plugin manager. Throw an exception if it is missing.
public
getDbTableManager() : PluginManager
Tags
Return values
PluginManager —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
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 —getUser()
Get user.
public
getUser() : UserEntityInterface|null
Return values
UserEntityInterface|null —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
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
Return values
void —setCreated()
Set created date.
public
setCreated(DateTime $dateTime) : UserListEntityInterface
Parameters
- $dateTime : DateTime
-
Created date
Return values
UserListEntityInterface —setDbServiceManager()
Set the service plugin manager.
public
setDbServiceManager(PluginManager $manager) : void
Parameters
- $manager : PluginManager
-
Plugin manager
Return values
void —setDbTableManager()
Set the table plugin manager.
public
setDbTableManager(PluginManager $manager) : void
Parameters
- $manager : PluginManager
-
Plugin manager
Return values
void —setDescription()
Set description.
public
setDescription(string|null $description) : UserListEntityInterface
Parameters
- $description : string|null
-
Description
Return values
UserListEntityInterface —setPublic()
Set whether the list is public.
public
setPublic(bool $public) : UserListEntityInterface
Parameters
- $public : bool
-
Is the list public?
Return values
UserListEntityInterface —setSession()
Set session container.
public
setSession(Container $session) : void
Parameters
- $session : Container
-
Session container
Return values
void —setTitle()
Set title.
public
setTitle(string $title) : UserListEntityInterface
Parameters
- $title : string
-
Title
Return values
UserListEntityInterface —setUser()
Set user.
public
setUser(UserEntityInterface|null $user) : UserListEntityInterface
Parameters
- $user : UserEntityInterface|null
-
User owning the list.