SeedDMS_Core_KeywordCategory
in package
Class to represent a keyword category in the document management system
Tags
Table of Contents
Properties
- $_dms : SeedDMS_Core_DMS
- $_id : int
- $_name : string
- $_ownerID : int
Methods
- __construct() : mixed
- SeedDMS_Core_KeywordCategory constructor.
- addKeywordList() : bool
- Add a new keyword to category
- countKeywordLists() : int
- Return number of keywords in category
- editKeywordList() : bool
- Change a keyword
- getID() : int
- Return internal id of keyword category
- getKeywordLists() : array<string|int, mixed>
- Get list of keywords in category
- getName() : string
- Return name of keyword category
- getOwner() : bool|SeedDMS_Core_User
- Return owner of keyword category
- remove() : bool
- Delete all keywords of category and category itself
- removeKeywordList() : bool
- Remove keyword
- setDMS() : mixed
- setName() : bool
- Set name of keyword category
- setOwner() : bool
- Set owner of keyword category
Properties
$_dms
protected
SeedDMS_Core_DMS
$_dms
reference to dms this category belongs to
Tags
$_id
protected
int
$_id
id of keyword category
Tags
$_name
protected
string
$_name
name of category
Tags
$_ownerID
protected
int
$_ownerID
id of user who is the owner
Tags
Methods
__construct()
SeedDMS_Core_KeywordCategory constructor.
public
__construct( $id, $ownerID, $name) : mixed
Parameters
addKeywordList()
Add a new keyword to category
public
addKeywordList( $keywords) : bool
Parameters
Return values
boolcountKeywordLists()
Return number of keywords in category
public
countKeywordLists() : int
Return values
int —number of keywords in this list
editKeywordList()
Change a keyword
public
editKeywordList( $kid, $keywords) : bool
This method identifies the keyword by its id and also ensures that the keyword belongs to the category, though the keyword id would be sufficient to uniquely identify the keyword.
Parameters
Return values
boolgetID()
Return internal id of keyword category
public
getID() : int
Return values
intgetKeywordLists()
Get list of keywords in category
public
getKeywordLists() : array<string|int, mixed>
Return values
array<string|int, mixed> —keywords of category
getName()
Return name of keyword category
public
getName() : string
Return values
stringgetOwner()
Return owner of keyword category
public
getOwner() : bool|SeedDMS_Core_User
Return values
bool|SeedDMS_Core_Userremove()
Delete all keywords of category and category itself
public
remove() : bool
Return values
boolremoveKeywordList()
Remove keyword
public
removeKeywordList( $kid) : bool
This method identifies the keyword by its id and also ensures that the keyword belongs to the category, though the keyword id would be sufficient to uniquely identify the keyword.
Parameters
Return values
boolsetDMS()
public
setDMS(SeedDMS_Core_DMS $dms) : mixed
Parameters
- $dms : SeedDMS_Core_DMS
setName()
Set name of keyword category
public
setName( $newName) : bool
Parameters
Return values
boolsetOwner()
Set owner of keyword category
public
setOwner(SeedDMS_Core_User $user) : bool
Parameters
- $user : SeedDMS_Core_User