Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
Asset_Map Class Reference

Public Member Functions

 Asset_Map ()
 
 paint (&$backend)
 
 _findCommonParentId ($assetid1, $assetid2)
 
 _findCommonRoot ($assetids)
 
 _getInitialLineageSelection ($type='')
 
 embedAssetMap ($type='simple', $width=200, $height=0)
 
 _send ($output)
 
 _error ($code)
 
 process (&$backend)
 
 _getTranslations (&$input)
 
 _doInitialise ()
 
 _convertCharset ($string='', $charset='UTF-8')
 
 _getAssetInfo ($assetid, $linkid=0)
 
 _getChildAssets (&$root, $assetid, $dependants_only=FALSE, $start=0, $limit=0)
 
 _getAssetDisplayName ($asset)
 
 _getAssets (&$input)
 
 _getURL (&$input, &$backend)
 
 _moveAsset (&$input, &$backend)
 
 _cloneAsset (&$input, &$backend)
 
 _newLink (&$input)
 
 _moveAssets ($input)
 
 _cloneAssets (&$input)
 
 _newLinks (&$input)
 

Detailed Description

Definition at line 30 of file asset_map.inc.

Member Function Documentation

_cloneAsset ( $input,
$backend 
)

Attempts to move an asset from one position to another

Parameters
object&$inputthe request info from the Flash
object&$backendbackend
Returns
void private

Definition at line 1740 of file asset_map.inc.

_cloneAssets ( $input)

Attempts to clone one or more assets

   <command action="clone_asset", to_parent_assetid="" to_parent_pos="">
      <asset assetid="" linkid="" parentid="">
      <asset assetid="" linkid="" parentid="">
      <... />
   </command>
Parameters
object&$inputthe request info from the Asset Map in the above form
Returns
void private

Definition at line 2090 of file asset_map.inc.

_convertCharset (   $string = '',
  $charset = 'UTF-8' 
)

Converts encoding of a string to the specified charset

Parameters
string$stringString to convert
string$charsetCharacter set to convert to
Returns
string private

Definition at line 738 of file asset_map.inc.

_doInitialise ( )

Get's all the asset types and the root folder and the current user asset's

Parameters
object&$inputthe request info from the Flash
Returns
void private

Definition at line 668 of file asset_map.inc.

_error (   $code)

Creates and error message, and returns it to the asset map

Parameters
string$codethe error code
Returns
void private

Definition at line 541 of file asset_map.inc.

_findCommonParentId (   $assetid1,
  $assetid2 
)

Finds a common parent for two assets

Parameters
int$assetid1First assetid
int$assetid2Second assetid
Returns
int public

Definition at line 89 of file asset_map.inc.

_findCommonRoot (   $assetids)

Finds a common root (parent) asset for a set of assetids

Parameters
int$assetidsAssetids
Returns
int public

Definition at line 136 of file asset_map.inc.

_getAssetDisplayName (   $asset)

Generates the name that should label an asset in the asset map from the string in the config and asset names and id

Parameters
string$assetArray of info about the asset
Returns
void private

Definition at line 1403 of file asset_map.inc.

_getAssetInfo (   $assetid,
  $linkid = 0 
)

Returns an array of the asset's information to be used by the asset map

Parameters
string$assetidthe assetid of the asset's wanted info
string$linkidthe linkid of the asset's wanted info
Returns
array private

Definition at line 759 of file asset_map.inc.

_getAssets ( $input)

Processes the get assets request and outputs the xml to stardard out

Parameters
object&$inputthe request info from the Flash
Returns
void private

Definition at line 1458 of file asset_map.inc.

_getChildAssets ( $root,
  $assetid,
  $dependants_only = FALSE,
  $start = 0,
  $limit = 0 
)

Appends the child assets of the specified asset in xml form to the specified node

Parameters
object&$rootthe root to append the child assets to
string$assetidthe asset of the parent asset
boolean$dependants_onlyif TRUE only the dependants will be retreived
int$startasset offset
int$limitmax number of assets
Returns
void private

Definition at line 1019 of file asset_map.inc.

_getInitialLineageSelection (   $type = '')

Gets the current assets lineage from the url

Bugfix #2588: filter out invisible links from the sort order for correct group (set) expansion

Parameters
string$typeAsset Map Type (i.e. simple)
Returns
string public

Definition at line 168 of file asset_map.inc.

_getTranslations ( $input)

Grab the translations from the pre-generated .properties file and send it to the java applet

Parameters
object&$inputthe request info from the Java
Returns
void private

Definition at line 635 of file asset_map.inc.

_getURL ( $input,
$backend 
)

Processes the get url request

Parameters
object&$inputthe request info from the Flash
object&$backendbackend
Returns
void private

Definition at line 1523 of file asset_map.inc.

_moveAsset ( $input,
$backend 
)

Attempts to move an asset from one position to another

Parameters
object&$inputthe request info from the Flash
object&$backendbackend
Returns
void private

Definition at line 1636 of file asset_map.inc.

_moveAssets (   $input)

Attempts to move one or more assets from one position to another

   <command action="move_asset", to_parent_assetid="" to_parent_pos="">
      <asset assetid="" linkid="" parentid="">
      <asset assetid="" linkid="" parentid="">
      <... />
   </command>
Parameters
object$inputthe request info from the Asset Map in the form:
Returns
void private

Definition at line 1896 of file asset_map.inc.

_newLink ( $input)

Attempts to create a new link

Parameters
object&$inputthe request info from the Flash
Returns
void private

Definition at line 1816 of file asset_map.inc.

_newLinks ( $input)

Attempts to create multiple new links

   <command action="new_link", to_parent_assetid="" to_parent_pos="">
      <asset assetid="" linkid="" parentid="">
      <asset assetid="" linkid="" parentid="">
      <... />
   </command>
Parameters
object&$inputthe request info from the Asset Map in the form:
Returns
void private

Definition at line 2224 of file asset_map.inc.

_send (   $output)

Sends an XML Tree down the line

Parameters
object$outputoutput
Returns
void private

Definition at line 525 of file asset_map.inc.

Asset_Map ( )

Constructor

Definition at line 38 of file asset_map.inc.

embedAssetMap (   $type = 'simple',
  $width = 200,
  $height = 0 
)

To create the tags that embed the simple asset map into the matrix system

NB. this function does not attempt to print any form tags. It is up the the printing entity to do this. The form needs to be in the form: <form name="main_form"> ... </form> The form name needs to be 'main_form'.

Parameters
string$typethe type of asset map to embed, eg. simple, complex, etc. (there could be more later)
int$widththe width of the asset map
int$heightthe height of the asset map
Returns
void public

Definition at line 371 of file asset_map.inc.

paint ( $backend)

Print out the code for the asset map

Parameters
object&$backendthe backend object
Returns
void public

Definition at line 52 of file asset_map.inc.

process ( $backend)

Processes requests from the Flash and returns XML replies

Parameters
object&$backendthe backend object
Returns
void public

Definition at line 573 of file asset_map.inc.


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