Squiz Matrix
4.12.2
|
Public Member Functions | |
Thesaurus ($assetid=0) | |
delete ($release_lock) | |
_createAdditional (&$link) | |
getAbbreviations () | |
getSynonymsForTerm ($term) | |
getChildTerms ($termid, $relid=NULL) | |
countChildTerms ($termid) | |
countTermLinks () | |
countTerms () | |
countParentTerms ($termid) | |
getChildRelationsForTerm ($termid) | |
getParentRelationsForTerm ($termid) | |
getAllTerms () | |
getParentTerms ($termid, $relid=NULL) | |
getRelatedTerms ($relation_id='') | |
_addTerm ($term) | |
addTerm ($term) | |
addTermNote ($termid, $note_name, $note_value) | |
getTermNotes ($termid) | |
deleteTermNotes ($termid) | |
linkTerms ($minorid, $majorid, $relid) | |
_linkTerms ($minorid, $majorid, $relation_id=NULL) | |
updateTerm ($termid, $name) | |
renameRelation ($relation_id, $new_name) | |
getTermById ($termid) | |
getTermLinkById ($linkid) | |
getRelationIdByName ($name) | |
addRelation ($name) | |
updateLinkRelation ($linkid, $relid) | |
getTermLinkByTermids ($termid, $parentid, $relid=NULL) | |
getTermIdByName ($name) | |
getTermIdsByNames ($names) | |
isTerm ($term=NULL, $termid=0) | |
getActiveRelations () | |
erase () | |
_deleteStoredContents () | |
getXmlFilePath () | |
_getName ($short_name=FALSE, $contextid=NULL) | |
getAbsoluteParentsInRelation ($relation_id=NULL) | |
getLineagesForTerm ($termid) | |
getAsset ($shadowid, $type_code='', $mute_errors=FALSE) | |
getAssetMapLinks () | |
_getShadowAssetMapLinks ($parent_term_id=NULL) | |
_getTopTermsAssetMapLinks () | |
getAssetInfo ($assetids, $type_code=Array(), $strict_type_code=TRUE, $field='') | |
getAssetMapAssetInfo ($assetid) | |
getLinks ($assetid, $link_types, $type_code='', $strict_type_code=TRUE, $side_of_link='major', $sort_by=NULL) | |
getLink ($assetid, $link_type=NULL, $type_code='', $strict_type_code=TRUE, $value=NULL, $side_of_link='major', $exclusive=NULL) | |
getLinkByAsset ($assetid, $other_assetid, $link_types=NULL, $value=NULL, $side_of_link='major', $force_array=FALSE, $dependant=NULL, $exclusive=NULL) | |
getLinkById ($linkid, $assetid=0, $side_of_link='major') | |
_getAllowedLinks () | |
getChildren ($assetid, $type_code='thesaurus_term', $strict_type_code=TRUE, $dependant=TRUE, $sort_by=NULL) | |
getParents ($assetid, $type_code='', $strict_type_code=TRUE) | |
createAssetLink (&$major, &$minor, $link_type, $value='', $sort_order=NULL, $dependant='0', $exclusive='0', $moving=FALSE) | |
getPermission ($assetid, $permission, $granted=NULL, $and_greater=TRUE, $expand_groups=FALSE, $all_info=FALSE) | |
markContentsChanged () | |
countLinks ($assetid, $side_of_link='major', $link_types=0, $type_code='', $strict_type_code=TRUE, $ignore_linkid=0) | |
deleteAssetLink ($linkid, $moving=FALSE) | |
deleteTermLink ($linkid) | |
_deleteTermLink ($linkid) | |
deleteTerm ($termid) | |
deleteRelation ($relid) | |
moveLink ($linkid, $to_parentid, $link_type, $to_parent_pos) | |
updateLink ($linkid, $link_type=NULL, $value=NULL, $new_sort_order=NULL) | |
assetExists ($assetids) | |
getReflections () | |
getReflectionForRelation ($start) | |
addReflection ($start, $end) | |
deleteReflection ($start) | |
setReflections ($ref_array) | |
canClone () | |
getLineageFromURL ($assetid, $protocol, $url) | |
Public Member Functions inherited from Asset | |
Asset ($assetid=0) | |
create (Array &$link) | |
load ($assetid) | |
_loadDataPaths () | |
reload () | |
canDelete () | |
delete ($release_lock=TRUE, $check_locked=TRUE) | |
useSystemVersion () | |
loadSystemVersion () | |
saveSystemVersion () | |
clearSystemVersion () | |
revertToSystemVersion () | |
revertNoticeLinksToSystemVersion () | |
_updated ($update_parents=TRUE) | |
type () | |
getTypeAncestors ($include_asset=TRUE) | |
incrementVersion ($number='micro', $update_parents=TRUE) | |
getLanguages () | |
setLanguages (Array $languages) | |
setCharset ($charset) | |
setForceSecure ($force_secure) | |
remapAssetids (Array $map) | |
morph ($new_type_code) | |
_morphCleanup ($new_type_code) | |
onRequestKeywords (Asset $broadcaster, Array $vars=Array()) | |
canClone () | |
cloneComponents (Asset $clone, Array $components, $override=FALSE) | |
cloneComponentsAdditional (Asset $clone, Array $components) | |
cloneLinks (Asset $clone) | |
getStatus () | |
getAvailableStatii () | |
getStatusDescription () | |
processStatusChange ($new_status, $update_parents=TRUE, $run_updated=TRUE) | |
setDate ($date_type, $time=NULL, $userid=NULL) | |
lockTypes () | |
canForceablyAcquireLock ($lock_type) | |
getEditingLocks ($keywords) | |
_getAllowedLinks () | |
createLink (Asset $minor, $link_type, $value='', $sort_order=NULL, $dependant='0', $exclusive='0', $moving=FALSE, $locked=0) | |
prepareLink (Asset $asset, $side_of_link, &$link_type, &$value, &$sort_order, &$dependant, &$exclusive) | |
canCreateLink (Asset $minor, $link_type, $exclusive) | |
canMoveLink (Asset $minor, Asset $old_major, $link_type) | |
describeLink ($linkid) | |
isDeletableLink ($linkid) | |
canDeleteLink ($linkid) | |
deleteLink ($linkid, $check_locked=TRUE) | |
linksUpdated () | |
canCloneLink () | |
saveAttributes ($dont_run_updated=FALSE, $log_message=TRUE) | |
setAttrValue ($name, $value) | |
attr ($name) | |
& | attrByRef ($name) |
getAttribute ($name, $mute_errors=FALSE) | |
getAssetKeywords ($descriptions=FALSE) | |
getAvailableKeywords () | |
getKeywordReplacement ($keyword) | |
getAssetWebPathKeywordReplacement () | |
getCustomKeywordReplacements ($keywords=Array(), $invoke_backend=FALSE) | |
processCustomKeywords ($keywords=Array()) | |
getContent () | |
setContent () | |
getEffectiveLastUpdatedTime ($assetids) | |
readAccess (Array $assetids=Array()) | |
writeAccess ($lock_type='', Array $assetids=Array(), $only_workflow=TRUE) | |
adminAccess ($lock_type='', Array $assetids=Array()) | |
backendAccess () | |
liveEditAccess ($lock_type) | |
canliveEdit ($lock_type) | |
effectiveUnrestricted () | |
checkAccess ($perm, $lock_type, Array $assetids=Array(), $only_workflow=TRUE) | |
accessEffective () | |
permissionsUpdated () | |
printFrontend () | |
printFrontendAsset (Asset $asset, $design=NULL) | |
getValidProtocols () | |
printHead () | |
printBody () | |
getCurrentPaintLayoutName () | |
getCurrentDesignName () | |
printBodyWithPaintLayout ($layout_id='') | |
initLimbo () | |
printLimbo () | |
paintBackend (Backend_Outputter $o) | |
getPrefix () | |
processBackend (Backend_Outputter $o, Array &$link) | |
getEI () | |
getEditFns () | |
getBackendHref ($screen='', $backend_page=TRUE) | |
getURL ($base_url=NULL, $ignore_rollback=FALSE, $base_contextid=NULL) | |
getURLs () | |
getHref ($base_url=NULL, $ignore_rollback=FALSE) | |
getWebDataPath () | |
getWebPaths () | |
saveWebPaths ($paths, $auto_add_remaps=TRUE) | |
getLookups ($field='') | |
getDesignLookups () | |
getLookupValues ($inherited=NULL, $prefix='', $like_search=TRUE, $ignore_override=FALSE) | |
deleteLookupValue ($layout_name, $layout_value) | |
setPaintLayouts ($layouts) | |
updateLookups ($auto_add_remaps=TRUE) | |
setLookupValues (Array $values) | |
getAssetStatusDescriptionKeywordReplacement () | |
getAssetStatusColourKeywordReplacement () | |
replaceKeywordsInString ($string) | |
fastTrack ($tasks) | |
unFastTrack ($tasks) | |
shouldFastTrack ($task, $assetid=NULL) | |
getFaskTrackedTaskAssetids ($task) | |
getDependantParentsURL () | |
Public Member Functions inherited from MySource_Object | |
MySource_Object () | |
__sleep () | |
__wakeup () | |
Additional Inherited Members | |
Data Fields inherited from Asset | |
$id = 0 | |
$version = '' | |
$name = '' | |
$short_name = '' | |
$status | |
$languages = '' | |
$charset = '' | |
$force_secure = '0' | |
$created | |
$created_userid | |
$updated | |
$updated_userid | |
$published | |
$published_userid | |
$status_changed | |
$status_changed_userid | |
$_is_cacheable = FALSE | |
$vars = Array() | |
$_available_keywords = Array() | |
$data_path_suffix = '' | |
$data_path = '' | |
$data_path_public = '' | |
$_ser_attrs = FALSE | |
Protected Member Functions inherited from Asset | |
_preCreateCheck (Array &$link) | |
_createAdditional (Array &$link) | |
_abortCreate ($trigger_level_changed=FALSE, $linkid=0) | |
_loadVars () | |
_getName ($short_name=FALSE, $contextid=NULL) | |
_getKeywordReplacement ($keyword) | |
_checkPermissionAccess ($perm, $assetids=Array(), $only_workflow=TRUE) | |
makeAndSaveInitialWebPath ($path, $parent_link=NULL) | |
Definition at line 35 of file thesaurus.inc.
_addTerm | ( | $term | ) |
Helper function to add a term to the system
NOTE: Does NOT check if the term already exists
string | $term | Term |
Definition at line 551 of file thesaurus.inc.
_createAdditional | ( | & | $link | ) |
Perform any additional processing required during the creation of this asset
Thesaurii create their data directory when created
array | &$link | information used to create the initial link |
Definition at line 83 of file thesaurus.inc.
_deleteStoredContents | ( | ) |
Deletes the contents of the database for this thesaurus
Definition at line 1347 of file thesaurus.inc.
_deleteTermLink | ( | $linkid | ) |
Delete a link between two terms
int | $linkid | link id to remove |
Definition at line 2285 of file thesaurus.inc.
_getAllowedLinks | ( | ) |
Returns an array of all the permitted links type, the type asset and the cardinality In the form
Array('[link_type]' => Array('[type_code]' => Array('card' => [cardinality], 'exclusive' => [exclusive]))); Where: link_type = SQ_LINK_TYPE_1|SQ_LINK_TYPE_2|SQ_LINK_TYPE_3|SQ_LINK_NOTICE cardinality = [max number of links]|'M' exclusive = TRUE|FALSE
Definition at line 1957 of file thesaurus.inc.
_getName | ( | $short_name = FALSE , |
|
$contextid = NULL |
|||
) |
Get asset name
boolean | $short_name | Return the short_name or name? |
int | $contextid | What context to return the name from |
Definition at line 1416 of file thesaurus.inc.
_getShadowAssetMapLinks | ( | $parent_term_id = NULL | ) |
Used by asset map to return a asset map-style link array
int | $parent_term_id | The ID of the parent term |
Definition at line 1579 of file thesaurus.inc.
_getTopTermsAssetMapLinks | ( | ) |
Get all terms for display as top level terms in the asset map
Definition at line 1635 of file thesaurus.inc.
_linkTerms | ( | $minorid, | |
$majorid, | |||
$relation_id = NULL |
|||
) |
Link two terms together
NOTE: This function does not check if the terms exist NOTE: Does not check if the LINK already EXISTS
string | $minorid | Minor term |
string | $majorid | Major term, if NULL, linking to the top |
string | $relation_id | Relation |
Definition at line 775 of file thesaurus.inc.
addReflection | ( | $start, | |
$end | |||
) |
Add a reflection
string | $start | id of one relation in a reflection |
string | $end | id of another relation in a reflection |
Definition at line 2587 of file thesaurus.inc.
addRelation | ( | $name | ) |
Get relation ID given the name
string | $name | relation name |
Definition at line 1050 of file thesaurus.inc.
addTerm | ( | $term | ) |
Add a term to the system
Wrapper around '_addTerm' that checks if the term already exists
string | $term | Term |
Definition at line 593 of file thesaurus.inc.
addTermNote | ( | $termid, | |
$note_name, | |||
$note_value | |||
) |
Add a term note
string | $termid | Term ID |
string | $note_name | Note Name |
string | $note_value | Note Value |
Definition at line 613 of file thesaurus.inc.
assetExists | ( | $assetids | ) |
Determine if the passed assetid or assetids refer(s) to a valid asset in the system
int | array | $assetids | the ID of the asset we are going to the check for existence or an array of assetids we want to check |
Definition at line 2481 of file thesaurus.inc.
canClone | ( | ) |
Returns TRUE if this type of asset can be cloned
Override this function if you do not want a particular type of asset to be cloned
Definition at line 2650 of file thesaurus.inc.
countChildTerms | ( | $termid | ) |
Count child terms
Get a count of how many terms are linked directly under a given term
int | $termid | Term |
Definition at line 235 of file thesaurus.inc.
countLinks | ( | $assetid, | |
$side_of_link = 'major' , |
|||
$link_types = 0 , |
|||
$type_code = '' , |
|||
$strict_type_code = TRUE , |
|||
$ignore_linkid = 0 |
|||
) |
Return the number of links in the system that involve the specified asset
Can be restricted by either link type and/or asset type code
int | $assetid | id of the the $side_of_link asset |
string | $side_of_link | Which side of the link this (the current) asset is on ('major' or 'minor') |
int | $link_types | integer that can be the product of bitwise operations on the SQ_LINK_* constants |
mixed | $type_code | the type of asset that is linked (eg 'Page', 'File', etc) if an array returns link if matches any of the array values |
boolean | $strict_type_code | whether we are finding assets that are just a $type_code or $type_code and any of it's sub-classes |
int | $ignore_linkid | ignore the link represented by this link id when returning the count |
Implements Bridge.
Definition at line 2194 of file thesaurus.inc.
countParentTerms | ( | $termid | ) |
Count parent terms
Get a count of how many terms are linked directly above a given term
int | $termid | Term |
Definition at line 315 of file thesaurus.inc.
countTermLinks | ( | ) |
countTerms | ( | ) |
createAssetLink | ( | & | $major, |
& | $minor, | ||
$link_type, | |||
$value = '' , |
|||
$sort_order = NULL , |
|||
$dependant = '0' , |
|||
$exclusive = '0' , |
|||
$moving = FALSE |
|||
) |
Create a link between the two supplied assets
returns the linkid of the created link
object | &$major | the major asset that we are linking from |
object | &$minor | the minor asset that we are linking to |
string | $link_type | the type of link this is |
string | $value | the value that is to be associated with this link |
string | $sort_order | the position in the links list that this link should take, if NULL or less than zero places at end of list |
string | $dependant | '0' / '1' - whether the minor asset is dependant on the major |
string | $exclusive | '0' / '1' - whether the major asset is to be the minor's only parent |
boolean | $moving | whether or not this asset is being moved |
Definition at line 2070 of file thesaurus.inc.
delete | ( | $release_lock | ) |
Delete Asset
boolean | $release_lock | TRUE, to release lock |
Definition at line 61 of file thesaurus.inc.
deleteAssetLink | ( | $linkid, | |
$moving = FALSE |
|||
) |
Remove a link by id
int | $linkid | the link id of the link to remove |
boolean | $moving | TRUE if this delete is part of a move operation |
Implements Bridge.
Definition at line 2224 of file thesaurus.inc.
deleteReflection | ( | $start | ) |
Delete a reflection
string | $start | id of one relation in a reflection |
Definition at line 2611 of file thesaurus.inc.
deleteRelation | ( | $relid | ) |
Delete a link between two terms
string | $relid | link id to remove |
Definition at line 2371 of file thesaurus.inc.
deleteTerm | ( | $termid | ) |
Delete a term
int | $termid | term id to remove |
Definition at line 2318 of file thesaurus.inc.
deleteTermLink | ( | $linkid | ) |
Delete a link between two terms
int | $linkid | link id to remove |
Definition at line 2251 of file thesaurus.inc.
deleteTermNotes | ( | $termid | ) |
Delete All notes for a particular term
string | $termid | Term ID |
Definition at line 701 of file thesaurus.inc.
erase | ( | ) |
Erases the contents of a thesaurus
Definition at line 1326 of file thesaurus.inc.
getAbbreviations | ( | ) |
Get an array of abbrevations
the result is an array of format ("A" => "Australia") abbreviation => expansion NOTE: An expansion can have only one abbreviation
Definition at line 104 of file thesaurus.inc.
getAbsoluteParentsInRelation | ( | $relation_id = NULL | ) |
Get a list of Terms that only act as parents in a relation
int | $relation_id | relation Id |
Definition at line 1442 of file thesaurus.inc.
getActiveRelations | ( | ) |
Returns a list of all the relations in a thesaurus
Definition at line 1293 of file thesaurus.inc.
getAllTerms | ( | ) |
getAsset | ( | $shadowid, | |
$type_code = '' , |
|||
$mute_errors = FALSE |
|||
) |
Returns a reference to the asset represented by the passed assetid or NULL on error
int | $shadowid | the shadow part asset id to be loaded (i.e part after the ':') |
string | $type_code | if this exists then this object is used to load the asset, if not then the DB is queried to find out the asset type |
boolean | $mute_errors | stops the outputting of errors in this fn, needed because you can't use the '@' operator when returning by reference |
Implements Bridge.
Definition at line 1538 of file thesaurus.inc.
getAssetInfo | ( | $assetids, | |
$type_code = Array() , |
|||
$strict_type_code = TRUE , |
|||
$field = '' |
|||
) |
Returns an array of information about assets of the passed codes
If one value in $field then the return value is Array(assetid => '[field]'), otherwise Array(assetid => Array())
array | $assetids | an array of assets to limit |
mixed | $type_code | an asset type code, or array of typecodes, to limit results to |
boolean | $strict_type_code | ensure returned assets are of the passed type codes |
string | $field | single field from the asset table to return (along with the assetid) Default is all fields |
Definition at line 1702 of file thesaurus.inc.
getAssetMapAssetInfo | ( | $assetid | ) |
Get asset info for use by asset map
string | $assetid | Full Asset id to get information for |
Implements Bridge.
Definition at line 1743 of file thesaurus.inc.
getAssetMapLinks | ( | ) |
Used by asset map to return a asset map-style link array
Definition at line 1564 of file thesaurus.inc.
getChildRelationsForTerm | ( | $termid | ) |
Get Child Relations for Term
Get the relations a given term is a parent in
string | $termid | term |
Definition at line 347 of file thesaurus.inc.
getChildren | ( | $assetid, | |
$type_code = 'thesaurus_term' , |
|||
$strict_type_code = TRUE , |
|||
$dependant = TRUE , |
|||
$sort_by = NULL |
|||
) |
Get all asset ids that are below the passed assetid in the various trees in which it exists
Returns an array of assetids and their type code
int | $assetid | the id of the asset to get its children for |
mixed | $type_code | the type of asset that is linked (eg 'Page', 'File', etc) if an array returns link if matches any of the array values |
boolean | $strict_type_code | whether we are finding assets that are just a $type_code or $type_code and any of it's sub-classes |
boolean | $dependant | if TRUE, results will be filtered to assets that are dependants. If FALSE, results will all not be dependants. If NULL, results will not be filtered |
string | $sort_by | a field in the asset table you would like the results sorted by (eg. name, short_name etc) |
Implements Bridge.
Definition at line 2000 of file thesaurus.inc.
getChildTerms | ( | $termid, | |
$relid = NULL |
|||
) |
Get minor terms
Returns an array of terms which have a given term as their parent
int | $termid | Term |
string | $relid | Relation name to limit the lookup by |
Definition at line 172 of file thesaurus.inc.
getLineageFromURL | ( | $assetid, | |
$protocol, | |||
$url | |||
) |
Returns an array of assetid's + info in the order that they propogate out from THIS BRIDGE'S url
string | $assetid | the id of the last asset in the lineage |
string | $protocol | the protocol to match -> null means it is ignored |
string | $url | the url to check for -> null defaults it to current url |
Implements Bridge.
Definition at line 2667 of file thesaurus.inc.
getLineagesForTerm | ( | $termid | ) |
Get all lineages for a term
string | $termid | the name of the term |
Definition at line 1509 of file thesaurus.inc.
getLink | ( | $assetid, | |
$link_type = NULL , |
|||
$type_code = '' , |
|||
$strict_type_code = TRUE , |
|||
$value = NULL , |
|||
$side_of_link = 'major' , |
|||
$exclusive = NULL |
|||
) |
Get details of a link with the specified characteristics
int | $assetid | id of the the $side_of_link asset |
int | $link_type | integer that should be a single integer of the SQ_LINK_* constants |
mixed | $type_code | the type of asset that is linked (eg 'Page', 'File', etc) if an array returns link if matches any of the array values |
boolean | $strict_type_code | whether we are finding an asset that is just a $type_code or potentially an inherited type or $type_code and any of it's sub-classes |
string | $value | the value that is associated with this link |
string | $side_of_link | Which side of the link this (the current) asset is on ('major' or 'minor') |
boolean | $exclusive | The exclusive status for the link must be this (if not NULL) |
Definition at line 1817 of file thesaurus.inc.
getLinkByAsset | ( | $assetid, | |
$other_assetid, | |||
$link_types = NULL , |
|||
$value = NULL , |
|||
$side_of_link = 'major' , |
|||
$force_array = FALSE , |
|||
$dependant = NULL , |
|||
$exclusive = NULL |
|||
) |
Get details of the link(s) between the two specified assets
int | $assetid | id of the the $side_of_link asset |
int | $other_assetid | the asset on the other side of the link |
int | $link_types | integer that can be the product of bitwise operations on the SQ_LINK_* constants |
string | $value | the value that is associated with this link |
string | $side_of_link | Which side of the link the first assetid is on ('major' or 'minor') |
boolean | $force_array | force the results to return an array of links even if there is only one link |
boolean | $dependant | The dependant status for all the links must be this (if not NULL) |
boolean | $exclusive | The exclusive status for all the links must be this (if not NULL) |
Definition at line 1844 of file thesaurus.inc.
getLinkById | ( | $linkid, | |
$assetid = 0 , |
|||
$side_of_link = 'major' |
|||
) |
Get details of the link with specified linkid
int | $linkid | id of the desired link |
int | $assetid | id of the the $side_of_link asset if zero no check is made and both major and minor information is returned |
string | $side_of_link | Which side of the link the asset represented by $assetid is on ('major' or 'minor') |
Definition at line 1899 of file thesaurus.inc.
getLinks | ( | $assetid, | |
$link_types, | |||
$type_code = '' , |
|||
$strict_type_code = TRUE , |
|||
$side_of_link = 'major' , |
|||
$sort_by = NULL |
|||
) |
Return all links that this asset has to other assets
int | $assetid | id of the the $side_of_link asset |
int | $link_types | integer that can be the product of bitwise operations on the SQ_LINK_* constants |
mixed | $type_code | the type of asset that is linked (eg 'Page', 'File', etc) if an array returns link if matches any of the array values |
boolean | $strict_type_code | whether we are finding assets that are just a $type_code or $type_code and any of it's sub-classes |
string | $side_of_link | Which side of the link this (the current) asset is on ('major' or 'minor') |
string | $sort_by | a field in the asset table you would like the results sorted by (eg. name, short_name etc) |
Implements Bridge.
Definition at line 1789 of file thesaurus.inc.
getParentRelationsForTerm | ( | $termid | ) |
Get Parent Relations for Term
Get the relations a given term is a child in
string | $termid | term |
Definition at line 385 of file thesaurus.inc.
getParents | ( | $assetid, | |
$type_code = '' , |
|||
$strict_type_code = TRUE |
|||
) |
Get all asset ids that are above the passed assetid in the various trees in which it exists
It returns Array(int => string) returns an array of assetids and their type code
int | $assetid | the id of the asset to get its parents for |
string | array | $type_code | the type of asset that is linked (eg 'Page', 'File', etc) if an array returns link if matches any of the array values |
boolean | $strict_type_code | whether we are finding assets that are just a $type_code or $type_code and any of it's sub-classes |
Implements Bridge.
Definition at line 2038 of file thesaurus.inc.
getParentTerms | ( | $termid, | |
$relid = NULL |
|||
) |
Get parent terms
Return terms which are immediate parents of a given term
int | $termid | Term ID |
int | $relid | Relation ID |
Definition at line 441 of file thesaurus.inc.
getPermission | ( | $assetid, | |
$permission, | |||
$granted = NULL , |
|||
$and_greater = TRUE , |
|||
$expand_groups = FALSE , |
|||
$all_info = FALSE |
|||
) |
Returns an array of all user or user_group assets that have the passed permission for the passed asset
int | $assetid | the assetid for asset whose permissions to get |
string | $permission | the permission code you are getting |
boolean | $granted | type of Access : NULL = all, TRUE = granted, FALSE = denied |
boolean | $and_greater | get effective permission (eg read access = read or write or admin) |
boolean | $expand_groups | expand user groups so only user ids get returned (NOTE: only valid if $all_info is FALSE) |
boolean | $all_info | when FALSE fn just returns an array of userids for those that have permission When TRUE fn returns all info about the permission in the form of Array(userid => granted) (NOTE: TRUE is only valid if $and_greater and $expand_groups are FALSE) |
Definition at line 2142 of file thesaurus.inc.
getReflectionForRelation | ( | $start | ) |
Get reflection relation id given the other relation
string | $start | id of one relation in a reflection |
Definition at line 2570 of file thesaurus.inc.
getReflections | ( | ) |
getRelatedTerms | ( | $relation_id = '' | ) |
Given a relation, get all the Parent-Child pairs
string | $relation_id | Relation to lookup |
Definition at line 503 of file thesaurus.inc.
getRelationIdByName | ( | $name | ) |
Get relation ID given the name
string | $name | relation name |
Definition at line 1009 of file thesaurus.inc.
getSynonymsForTerm | ( | $term | ) |
Get synonyms for a given term
string | $term | Term to find synonyms for |
Definition at line 134 of file thesaurus.inc.
getTermById | ( | $termid | ) |
Get term by its (link) id
Gets the term that is linked as a minor by a particular link id
int | $termid | link id of the term |
Definition at line 945 of file thesaurus.inc.
getTermIdByName | ( | $name | ) |
Returns the assetid of the thesaurus term referenced by the passed term name
string | $name | The name of the sought term |
Definition at line 1157 of file thesaurus.inc.
getTermIdsByNames | ( | $names | ) |
Returns the assetids of the thesaurus terms referenced by the passed term names, in the format:
Array( 'termid' => 'name', )
NOTE: This does not chunk the query, may need to be modified to do so in the future
array | $names | An array of sought terms |
Definition at line 1205 of file thesaurus.inc.
getTermLinkById | ( | $linkid | ) |
Get term link by its id
Gets the term that is linked as a minor by a particular link id
int | $linkid | link id of the term |
Definition at line 978 of file thesaurus.inc.
getTermLinkByTermids | ( | $termid, | |
$parentid, | |||
$relid = NULL |
|||
) |
Get link by child and parent term ids
string | $termid | the id of the child in this link |
string | $parentid | the id of the parent in this link |
string | $relid | the relation of the link |
Definition at line 1123 of file thesaurus.inc.
getTermNotes | ( | $termid | ) |
Get All Term Notes
string | $termid | Term ID |
Definition at line 672 of file thesaurus.inc.
getXmlFilePath | ( | ) |
Get the path to the imported xml file
Definition at line 1399 of file thesaurus.inc.
isTerm | ( | $term = NULL , |
|
$termid = 0 |
|||
) |
Check whether supplied string is a term in this thesaurus
string | $term | term name |
int | $termid | term id |
Definition at line 1241 of file thesaurus.inc.
linkTerms | ( | $minorid, | |
$majorid, | |||
$relid | |||
) |
Link two terms in the system
Wrapper around '_linkTerms' that checks if this link already exists
string | $minorid | minor term id |
string | $majorid | major term id |
string | $relid | relation id |
Definition at line 741 of file thesaurus.inc.
markContentsChanged | ( | ) |
Mark thesaurus as having its contents changed
This function should be called when any change to thesaurus is performed XML output functionality depends on this
Definition at line 2159 of file thesaurus.inc.
moveLink | ( | $linkid, | |
$to_parentid, | |||
$link_type, | |||
$to_parent_pos | |||
) |
Move a link to a new parent
int | $linkid | the link id of the link to move |
int | $to_parentid | the asset id of the new parent asset |
int | $link_type | the type of the new link |
int | $to_parent_pos | the position under the new parent |
Definition at line 2440 of file thesaurus.inc.
renameRelation | ( | $relation_id, | |
$new_name | |||
) |
Renames all instances of $relation to $new_relation
Returns TRUE on success, FALSE on failure
string | $relation_id | relation to rename |
string | $new_name | the desired new relation |
Definition at line 894 of file thesaurus.inc.
setReflections | ( | $ref_array | ) |
Set an array of reflections
array | $ref_array | array of reflections in format 'a'=>'b', 'b'=>'a' |
Definition at line 2634 of file thesaurus.inc.
Thesaurus | ( | $assetid = 0 | ) |
Constructor
int | $assetid | the asset id to be loaded |
Definition at line 45 of file thesaurus.inc.
updateLink | ( | $linkid, | |
$link_type = NULL , |
|||
$value = NULL , |
|||
$new_sort_order = NULL |
|||
) |
Update the details of an existing link
If any of the detail vars are NULL they are not updated.
int | $linkid | the link id of the link to update |
int | $link_type | the type of the link (one of the SQ_LINK_* constants) |
string | $value | the value to place on the link |
int | $new_sort_order | the position in the links list that this link should take, if less than zero places at end of list |
Definition at line 2460 of file thesaurus.inc.
updateLinkRelation | ( | $linkid, | |
$relid | |||
) |
Update link with a new relation id
string | $linkid | relation name |
string | $relid | relation name |
Definition at line 1093 of file thesaurus.inc.
updateTerm | ( | $termid, | |
$name | |||
) |
Update term name and relation
Returns TRUE on success, FALSE on failure
int | $termid | link id to update |
string | $name | the name of term |
Definition at line 835 of file thesaurus.inc.