Menu

## SeedDMS_Core_KeywordCategory
in package

inc.ClassKeywords.php : 27

Class to represent a keyword category in the document management system

##### Tags

category

  DMS

author

  Markus Westphal, Malcolm Cowe, Uwe Steinmann uwe@steinmann.cx

copyright

  Copyright (C) 2002-2005 Markus Westphal, 2006-2008 Malcolm Cowe, 2010-2024 Uwe Steinmann

version

  Release: @package_version@

### Table of Contents

#### Properties

$_dms : SeedDMS_Core_DMS
$_id : int
$_name : string
$_owner : object
$_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

inc.ClassKeywords.php : 56
`protected SeedDMS_Core_DMS $_dms`

reference to dms this category belongs to

##### Tags

access

  protected

#### $_id

inc.ClassKeywords.php : 32
`protected int $_id`

id of keyword category

##### Tags

access

  protected

#### $_name

inc.ClassKeywords.php : 50
`protected string $_name`

name of category

##### Tags

access

  protected

#### $_owner

inc.ClassKeywords.php : 44
`protected object $_owner`

user who is the owner

##### Tags

access

  protected

#### $_ownerID

inc.ClassKeywords.php : 38
`protected int $_ownerID`

id of user who is the owner

##### Tags

access

  protected

### Methods

#### __construct()

inc.ClassKeywords.php : 65

SeedDMS_Core_KeywordCategory constructor.

`public __construct( $id, $ownerID, $name) : mixed`

##### Parameters

$id :
$ownerID :
$name :

#### addKeywordList()

inc.ClassKeywords.php : 199

Add a new keyword to category

`public addKeywordList( $keywords) : bool`

##### Parameters

$keywords :

  new keyword

##### Return values

bool

#### countKeywordLists()

inc.ClassKeywords.php : 164

Return number of keywords in category

`public countKeywordLists() : int`

##### Return values

int —

number of keywords in this list

#### editKeywordList()

inc.ClassKeywords.php : 186

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

$kid :
$keywords :

##### Return values

bool

#### getID()

inc.ClassKeywords.php : 85

Return internal id of keyword category

`public getID() : int`

##### Return values

int

#### getKeywordLists()

inc.ClassKeywords.php : 152

Get list of keywords in category

`public getKeywordLists() : array<string|int, mixed>`

##### Return values

array<string|int, mixed> —

keywords of category

#### getName()

inc.ClassKeywords.php : 92

Return name of keyword category

`public getName() : string`

##### Return values

string

#### getOwner()

inc.ClassKeywords.php : 99

Return owner of keyword category

`public getOwner() : bool|SeedDMS_Core_User`

##### Return values

bool|SeedDMS_Core_User

#### remove()

inc.ClassKeywords.php : 228

Delete all keywords of category and category itself

`public remove() : bool`

##### Return values

bool

#### removeKeywordList()

inc.ClassKeywords.php : 216

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

$kid :

##### Return values

bool

#### setDMS()

inc.ClassKeywords.php : 76
`public setDMS(SeedDMS_Core_DMS $dms) : mixed`

##### Parameters

$dms : SeedDMS_Core_DMS

#### setName()

inc.ClassKeywords.php : 111

Set name of keyword category

`public setName( $newName) : bool`

##### Parameters

$newName :

##### Return values

bool

#### setOwner()

inc.ClassKeywords.php : 132

Set owner of keyword category

`public setOwner(SeedDMS_Core_User $user) : bool`

##### Parameters

$user : SeedDMS_Core_User

##### Return values

bool

## Search results