Squiz Matrix
4.12.2
|
Public Member Functions | |
getAsset ($shadowid, $type_code='', $mute_errors=FALSE) | |
getLinks ($assetid, $link_types, $type_code='', $strict_type_code=TRUE, $side_of_link='major', $sort_by=NULL) | |
getParents ($assetid, $type_code='', $strict_type_code=TRUE) | |
getChildren ($assetid, $type_code='', $strict_type_code=TRUE, $dependant=NULL, $sort_by=NULL) | |
getLineageFromURL ($assetid, $protocol, $url) | |
countLinks ($assetid, $side_of_link='major', $link_types=0, $type_code='', $strict_type_code=TRUE, $ignore_linkid=0) | |
deleteAssetLink ($linkid, $moving=FALSE) | |
getAssetMapAssetInfo ($assetid) | |
Definition at line 29 of file bridge.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 afnd/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) (can be a string or an array of strings) 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 |
Implemented in Thesaurus, Simple_Form, Image, LDAP_Bridge, IPB_Bridge, Form, Trigger_Manager, File_Bridge, XML_User_Bridge, Form_Section, Search_Folder, Data_Source, Report_Incomplete_Metadata, Report_Safe_Trash, and Workflow_Bundle.
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 |
Implemented in Thesaurus, Simple_Form, Image, LDAP_Bridge, IPB_Bridge, Form, Trigger_Manager, File_Bridge, XML_User_Bridge, Data_Source, Form_Section, Search_Folder, Report_Safe_Trash, Report_Incomplete_Metadata, and Workflow_Bundle.
getAsset | ( | $shadowid, | |
$type_code = '' , |
|||
$mute_errors = FALSE |
|||
) |
Returns a reference to the asset represented by the passed assetid
Returns 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 |
Implemented in Thesaurus, TRIM_Saved_Search, Image, Form, Report_Incomplete_Metadata, Sharepoint_Saved_Search, Report_Safe_Trash, Form_Section, Trigger_Manager, IPB_Bridge, File_Bridge, XML_User_Bridge, Workflow_Bundle, Search_Folder, and Simple_Form.
getAssetMapAssetInfo | ( | $assetid | ) |
Get asset info for use by asset map
Should return an array containing the following elements:
web_path: Web path for this lineage of the asset, if known.
string | $assetid | Full Asset id to get information for |
Implemented in Thesaurus, LDAP_Bridge, Simple_Form, Image, IPB_Bridge, Form, File_Bridge, Form_Section, Data_Source, XML_User_Bridge, Trigger_Manager, Report_Incomplete_Metadata, Workflow_Bundle, Report_Safe_Trash, and Search_Folder.
getChildren | ( | $assetid, | |
$type_code = '' , |
|||
$strict_type_code = TRUE , |
|||
$dependant = NULL , |
|||
$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) |
Implemented in Thesaurus, LDAP_Bridge, Image, Form, IPB_Bridge, Form_Section, Data_Source, Trigger_Manager, Simple_Form, XML_User_Bridge, Search_Folder, File_Bridge, Report_Incomplete_Metadata, Report_Safe_Trash, and Workflow_Bundle.
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 |
Implemented in Thesaurus, Image, LDAP_Bridge, IPB_Bridge, Form, Data_Source, Form_Section, XML_User_Bridge, Trigger_Manager, Simple_Form, File_Bridge, Search_Folder, Report_Incomplete_Metadata, Report_Safe_Trash, and Workflow_Bundle.
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) |
Implemented in Thesaurus, Image, Data_Source, Form, Form_Section, File_Bridge, Workflow_Bundle, and Search_Folder.
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
int | $assetid | the id of the asset to get its parents for |
mixed | $type_code | the type of asset that is linked (eg 'User', 'User_Group', 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 |
Implemented in Thesaurus, Image, Form, LDAP_Bridge, Form_Section, IPB_Bridge, Trigger_Manager, File_Bridge, Simple_Form, Search_Folder, XML_User_Bridge, Report_Incomplete_Metadata, Report_Safe_Trash, and Workflow_Bundle.