Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
Bridge Interface Reference
Inheritance diagram for Bridge:
Data_Source File_Bridge Form Form_Section Image IPB_Bridge LDAP_Bridge Report_Incomplete_Metadata Report_Safe_Trash Search_Folder Simple_Form Thesaurus Trigger_Manager Workflow_Bundle XML_User_Bridge

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)
 

Detailed Description

Definition at line 29 of file bridge.inc.

Member Function Documentation

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

Parameters
int$assetidid of the the $side_of_link asset
string$side_of_linkWhich side of the link this (the current) asset is on ('major' or 'minor')
int$link_typesinteger that can be the product of bitwise operations on the SQ_LINK_* constants
mixed$type_codethe 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_codewhether we are finding assets that are just a $type_code or $type_code and any of it's sub-classes
int$ignore_linkidignore the link represented by this link id when returning the count
Returns
int public

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

Parameters
int$linkidthe link id of the link to remove
boolean$movingTRUE if this delete is part of a move operation
Returns
boolean public

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

Parameters
int$shadowidthe shadow part asset id to be loaded (i.e part after the ':')
string$type_codeif 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_errorsstops the outputting of errors in this fn, needed because you can't use the '@' operator when returning by reference
Returns
mixed object|NULL public
See Also
Asset_Manager::&getAsset()

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:

  • assetid: ID of the asset.
  • name: Full name of the asset.
  • short_name: Short name of the asset.
  • version: Asset version number.
  • status: Current status of the asset.
  • type_code: The type code of the shadow asset.
  • num_kids: Number of children, if known.
  • accessible: Whether the asset should be accessible.
  • url: URL for this lineage of the asset, if known.
  • web_path: Web path for this lineage of the asset, if known.

    Parameters
    string$assetidFull Asset id to get information for
    Returns
    array public

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

Parameters
int$assetidthe id of the asset to get its children for
mixed$type_codethe 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_codewhether we are finding assets that are just a $type_code or $type_code and any of it's sub-classes
boolean$dependantif 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_bya field in the asset table you would like the results sorted by (eg. name, short_name etc)
Returns
array public
See Also
Asset_Manager::getChildren()

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

Parameters
string$assetidthe id of the last asset in the lineage
string$protocolthe protocol to match -> NULL means it is ignored
string$urlthe url to check for -> NULL defaults it to current url
Returns
array public

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

Parameters
int$assetidid of the the $side_of_link asset
int$link_typesinteger that can be the product of bitwise operations on the SQ_LINK_* constants
mixed$type_codethe 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_codewhether we are finding assets that are just a $type_code or $type_code and any of it's sub-classes
string$side_of_linkWhich side of the link this (the current) asset is on ('major' or 'minor')
string$sort_bya field in the asset table you would like the results sorted by (eg. name, short_name etc)
Returns
array public
See Also
Asset_Manager::getLinks()

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

Parameters
int$assetidthe id of the asset to get its parents for
mixed$type_codethe 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_codewhether we are finding assets that are just a $type_code or $type_code and any of it's sub-classes
Returns
array public
See Also
Asset_Manager::getParents()

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.


The documentation for this interface was generated from the following file: