\CREATOR

Common functions for creators

Summary

Methods
Properties
Constants
__construct()
grabAll()
grabGroupMasters()
grabGroupAvailableMembers()
grabGroupMembers()
grabGroupAvailableMasters()
checkExists()
removeHanging()
insert()
formatInitials()
transferArrows()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

__construct()

__construct() : 

CREATOR class.

Returns

grabAll()

grabAll(  userBib = FALSE,   typeArray = FALSE,   metadata = FALSE,   group = FALSE) : mixed||string|int

Get creators from creators table.

Parameters

userBib

ID of user bibliography to use. Default is FALSE

typeArray

array of resource types within which to select creators. Default is FALSE

metadata

metadata type or metadata array ('quote', 'paraphrase' etc) -- gather only creators for resources which have metadata Default is FALSE

group

group database creators together into the same person if TRUE. Default is FALSE

Returns

mixed||string|int —

of id => creator

grabGroupMasters()

grabGroupMasters() : 

Gather creators who are group masters

Returns

FALSE|array of creators

grabGroupAvailableMembers()

grabGroupAvailableMembers(  notExists = FALSE) : 

Gather creators who are not group masters

Parameters

notExists

Returns

FALSE|array of creators

grabGroupMembers()

grabGroupMembers(  masterId) : 

Gather creators who are group members

Parameters

masterId

Returns

FALSE|array of creators

grabGroupAvailableMasters()

grabGroupAvailableMasters() : 

Gather creators who are not group members

Returns

FALSE|array of creators

checkExists()

checkExists(  surname,   firstname,   initials,   prefix) : 

Does this creator already exist in the database?

Parameters

surname
firstname
initials
prefix

Returns

creator ID if exists, FALSE otherwise

removeHanging()

removeHanging(  collectionDefaults = TRUE) : 

Remove resource-less and collection-less creators

Parameters

collectionDefaults

If TRUE, remove references to deleted creators in collection defaults fields. Default = TRUE

Returns

insert()

insert(mixed||string|int  v) : 

Inserts a new creator in the database.

Requires write permissions.

Parameters

mixed||string|int v

Array of surname, firstname, initials, prefix

Returns

Inserted ID

formatInitials()

formatInitials(  raw) : 

Format initials prior to storing in database

Initials are stored unpunctuated and space-delimited. In the final result, they can only consist of A-Z (and UTF-8) and space characters

Parameters

raw

Returns

transferArrows()

transferArrows() : mixed||string|int

Make the creator select transfer arrows to transfer creators between select boxes with onclick

Returns

mixed||string|int —

(toRightImage, toLeftImage)