Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
Data_Source_Graph Class Reference
Inheritance diagram for Data_Source_Graph:
Image File Bridge Asset MySource_Object

Public Member Functions

 Data_Source_Graph ($assetid=0)
 
 create (&$link, $info=Array())
 
 _createAdditional (&$link)
 
 printBody ()
 
 printImageTag ($alt='', $title='', $return=FALSE)
 
 describeLink ($linkid)
 
 paintBackend (&$o)
 
getNewGraph ()
 
 getFinalGraph ($to_file=FALSE)
 
 isGraphReady ()
 
 makePlotSettingsPreview ($graph_info)
 
 makeGlobalSettingsPreview ($to_file=FALSE)
 
 _addMarkerToPlot (&$marker_info, &$plot)
 
 printFrontend ()
 
 updateCache ()
 
 usePublicPath ()
 
 getGradType ($grad_type)
 
 saveSystemVersion ()
 
 revertToSystemVersion ()
 
 morph ($new_type_code)
 
 _checkFileState ()
 
 saveAttributes ($dont_run_updated=FALSE)
 
 _renameFile ($data_path, $old_filename, $new_filename)
 
 getExistingFile ()
 
- Public Member Functions inherited from Image
 Image ($assetid=0)
 
 cloneComponents (&$clone, $components, $override=FALSE)
 
 saveSystemVersion ()
 
 revertToSystemVersion ()
 
 getExistingFile ()
 
 printImageTag ($alt='', $title='', $return=FALSE)
 
 paintBackend (&$o)
 
 saveVariety ($variety, $recreate_image=TRUE, $save_attrs=TRUE, $file_versioning=TRUE, $check_write_access=TRUE)
 
 deleteVariety ($varietyid)
 
 updateLookups ($auto_add_remaps=TRUE)
 
 getAsset ($assetid, $type_code='', $mute_errors=FALSE)
 
 getLinks ($assetid, $link_types, $type_code='', $strict_type_code=TRUE, $side_of_link='major', $sort_by=NULL)
 
 getChildren ($assetid, $type_code='', $strict_type_code=TRUE, $dependant=NULL, $sort_by=NULL)
 
 getParents ($assetid, $type_code='', $strict_type_code=TRUE)
 
 printBody ()
 
 getAvailableKeywords ()
 
 getImageWidthKeywordReplacement ()
 
 getImageHeightKeywordReplacement ()
 
 getImageTagKeywordReplacement ()
 
 getKeywordReplacement ($keyword)
 
 _varietyImageSize ($variety_name)
 
 _getEmbeddedKeywordReplacement ($keyword)
 
 getLineageFromURL ($assetid, $protocol, $url)
 
 getPermission ($assetid, $permission, $granted=NULL, $and_greater=TRUE, $expand_groups=FALSE, $all_info=FALSE)
 
 setPermission ($assetid, $userid, $permission, $granted)
 
 deletePermission ($assetid, $userid, $permission)
 
 getAssetInfo ($assetids, $type_code=Array(), $strict_type_code=TRUE, $field='')
 
 assetExists ($assetids)
 
 getLink ($assetid, $link_type=NULL, $type_code='', $strict_type_code=TRUE, $value=NULL, $side_of_link='major', $exclusive=NULL)
 
 getLinkById ($linkid, $assetid=0, $side_of_link='major')
 
 countLinks ($assetid, $side_of_link='major', $link_types=0, $type_code='', $strict_type_code=TRUE, $ignore_linkid=0)
 
 getLinkByAsset ($assetid, $other_assetid, $link_types=NULL, $value=NULL, $side_of_link='major', $force_array=FALSE, $dependant=NULL, $exclusive=NULL)
 
 getAllChildLinks ($assetid, $link_type=0)
 
 updateLink ($linkid, $link_type=NULL, $value=NULL, $sort_order=NULL)
 
 deleteAssetLink ($linkid, $moving=FALSE)
 
 createAssetLink (&$major, &$minor, $link_type, $value='', $sort_order=NULL, $dependant='0', $exclusive='0', $moving=FALSE)
 
 getAssetMapAssetInfo ($assetid)
 
 validFile (Array $info)
 
- Public Member Functions inherited from File
 File ($assetid=0)
 
 create (Array &$link, $info=Array())
 
 createAdditional (Array &$link)
 
 cloneComponents (Asset $clone, Array $components, $override=FALSE)
 
 lockTypes ()
 
 saveSystemVersion ()
 
 revertToSystemVersion ()
 
 clearSystemVersion ()
 
 morph ($new_type_code)
 
 processStatusChange ($new_status, $update_parents=TRUE, $run_updated=TRUE)
 
 _getAllowedLinks ()
 
 _updated ($update_parents=TRUE)
 
 permissionsUpdated ()
 
 usePublicPath ()
 
 updateLookups ($auto_add_remaps=TRUE)
 
 processBackend (Backend_Outputter $o, Array &$link)
 
 saveAttributes ($dont_run_updated=FALSE)
 
 setAttrValue ($name, $value)
 
 validFile (Array $info)
 
 printFrontend ()
 
 getURL ($base_url=NULL, $ignore_rollback=FALSE)
 
 getHref ($base_url=NULL, $ignore_rollback=FALSE)
 
 getExistingFile ()
 
 _getName ($short_name=FALSE, $contextid=NULL)
 
 getAvailableKeywords ()
 
 getAssetFileSizeInBytesKeywordReplacement ()
 
 getAssetFileSizeReadableKeywordReplacement ()
 
 getAssetFileContentsKeywordReplacement ()
 
 delete ($release_lock=TRUE)
 
 scanFile ($path='')
 
 getFileTypeKeywordReplacement ()
 
 getAssetSummary ()
 
 getOriginalURL ($data_url, $site_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 ()
 

Data Fields

 $allowed_extensions = Array( 'png')
 
 $plotarea = NULL
 
- Data Fields inherited from Image
 $allowed_extensions = Array('gif', 'jpg', 'jpeg', 'png')
 
- Data Fields inherited from File
 $allowed_extensions = Array()
 
 $ignore_update = FALSE
 
- 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
 
- Data Fields inherited from MySource_Object
 $_tmp
 

Additional Inherited Members

- Protected Member Functions inherited from Image
 _checkFileState ()
 

Detailed Description

Definition at line 31 of file data_source_graph.inc.

Member Function Documentation

_addMarkerToPlot ( $marker_info,
$plot 
)

Add a marker to the plot

Parameters
array&$marker_infoThe array contains the setting information
array&$plotThe reference to the plot object which we are drawing
Returns
boolean public

Definition at line 763 of file data_source_graph.inc.

_checkFileState ( )

Look's after the placing and removing of out files in the public directory

Returns
boolean private

Definition at line 1067 of file data_source_graph.inc.

_createAdditional ( $link)

Perform any additional processing required during the creation of this asset

Graph image file is copied to the data directory WITHOUT registering the file versioning

Parameters
array&$linkinformation used to create the initial link
Returns
boolean private

Definition at line 129 of file data_source_graph.inc.

_renameFile (   $data_path,
  $old_filename,
  $new_filename 
)

Rename a file in file versioning (copy, create new FV entry and then delete old FV entry)

Parameters
string$data_pathdata path of the asset
string$old_filenameold filename
string$new_filenamefile to rename to
Returns
boolean private

Definition at line 1198 of file data_source_graph.inc.

create ( $link,
  $info = Array() 
)

Create this asset

Unlike Image asset, we need to privode a dummy graphic file during the creation

Parameters
array&$linkinformation used to create the initial link
array$infoinfo about the uploaded file
Returns
mixed int|boolean public
See Also
Asset::create()

Definition at line 74 of file data_source_graph.inc.

Data_Source_Graph (   $assetid = 0)

Constructor

Parameters
int$assetidthe asset id to be loaded

Definition at line 53 of file data_source_graph.inc.

describeLink (   $linkid)

Return a human readable description of the passed link

Parameters
int$linkidthe link ID of the link to describe
Returns
string public

Definition at line 261 of file data_source_graph.inc.

getExistingFile ( )

Get an array of some useful data about the existing uploaded file

Returns
array public

Definition at line 1225 of file data_source_graph.inc.

getFinalGraph (   $to_file = FALSE)

Finish a graph

User must call this function to create a new graph. All the global settings are applied at here during the creation

Parameters
boolean$to_fileIf it's TRUE, it saves a image as a file in the data directory instead of outputting a binary file with HTTP header information
Returns
object public

Definition at line 451 of file data_source_graph.inc.

getGradType (   $grad_type)

Called by the printBody to return the constant for the gradient type

Parameters
string$grad_typethe type of gradient
Returns
int public

Definition at line 915 of file data_source_graph.inc.

& getNewGraph ( )

Returns a reference to a new graph object

User must call this function to create a new graph. All the global settings are applied at here during the creation

Returns
object public

Definition at line 341 of file data_source_graph.inc.

isGraphReady ( )

Returns TRUE if the graph is ready to draw

Returns
boolean public

Definition at line 624 of file data_source_graph.inc.

makeGlobalSettingsPreview (   $to_file = FALSE)

Returns the preview graph to show the current plot setting

Parameters
boolean$to_fileIf it's TRUE, it saves a image as a file in the data directory instead of outputting a binary file with HTTP header information In this function, it's mainly used to generate a dummy graph image during the creation of this asset
Returns
boolean public

Definition at line 723 of file data_source_graph.inc.

makePlotSettingsPreview (   $graph_info)

Returns the preview graph to show the current plot setting

Parameters
array$graph_infoThe array contains the setting information for this plot.
Returns
boolean public

Definition at line 648 of file data_source_graph.inc.

morph (   $new_type_code)

Morph's this asset to either one of it's parent type or one of it's children types Only succeeds if $type_code asset's is allowed to link to all children that this asset has

Parameters
string$new_type_codethe new type_code to attempt to cast this asset to
Returns
boolean public

Definition at line 1034 of file data_source_graph.inc.

paintBackend ( $o)

Prints out the backend interface for the asset

We need to override this function to enable backend graph preview functionality

Parameters
object&$oA reference to the backend outputter
Returns
boolean public

Definition at line 287 of file data_source_graph.inc.

printBody ( )

Called by the design to print the body of this asset

Returns
void public

Definition at line 219 of file data_source_graph.inc.

printFrontend ( )

Prints out the frontend for this file with no design

Returns
void public
See Also
Data_Source_Graph::usePublicPath()
Data_Source_Graph::updateCache()

Definition at line 810 of file data_source_graph.inc.

printImageTag (   $alt = '',
  $title = '',
  $return = FALSE 
)

Prints the tag for an image

The output includes the width and height of the image, and the image name for the alt tag

Parameters
string$altthe alt tag content. If empty the alt var is used
string$titlethe alt tag content. If empty the and $alt is set, then that is used, otherwise the title var is used
boolean$returnif TRUE the tag will be returned
Returns
mixed string|void public

Definition at line 239 of file data_source_graph.inc.

revertToSystemVersion ( )

Replaces the editing version with the system (live) version

Returns
boolean public

Definition at line 1006 of file data_source_graph.inc.

saveAttributes (   $dont_run_updated = FALSE)

Set the value of an attribute

Parameters
boolean$dont_run_updatedif TRUE this->_updated() won't be run (THIS IS ONLY EVER CALLED FROM Asset::create())
Returns
boolean public

Definition at line 1127 of file data_source_graph.inc.

saveSystemVersion ( )

Saves a copy of this asset at this point in time This copy gets used when the asset is live and the user does not have write access

Returns
boolean public

Definition at line 961 of file data_source_graph.inc.

updateCache ( )

Update system cache for this asset

It checks the current cache status and updates it with the up-to-date graph image

Returns
boolean public
See Also
Data_Source_Graph::printFrontend()
Data_Source_Graph::usePublicPath()

Definition at line 860 of file data_source_graph.inc.

usePublicPath ( )

Returns whether to use the public path or not for this file

NOTE: This function is overriden here since we want to cache the image file for the frontend display. If the public path name is returned to serve the image then, there is no way to inform the Cache_Manager when to update its cache. Hence it should always return matrix-friendly web path, and the logic for caching can be implemented in printFrontend

Returns
boolean public
See Also
Data_Source_Graph::printFrontend()
Data_Source_Graph::updateCache()
File::updateLookups()

Definition at line 897 of file data_source_graph.inc.


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